[Scummvm-cvs-logs] SF.net SVN: scummvm: [31617] scummvm/trunk/engines/made

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Sun Apr 20 18:18:53 CEST 2008


Revision: 31617
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31617&view=rev
Author:   eriktorbjorn
Date:     2008-04-20 09:18:50 -0700 (Sun, 20 Apr 2008)

Log Message:
-----------
Catch EVENT_QUIT events, too. I realize that g_system->quit() isn't the nicest
way to quit a game, but it beats not being able to quit at all.

Modified Paths:
--------------
    scummvm/trunk/engines/made/pmvplayer.cpp
    scummvm/trunk/engines/made/scriptfuncs.cpp

Modified: scummvm/trunk/engines/made/pmvplayer.cpp
===================================================================
--- scummvm/trunk/engines/made/pmvplayer.cpp	2008-04-20 16:12:46 UTC (rev 31616)
+++ scummvm/trunk/engines/made/pmvplayer.cpp	2008-04-20 16:18:50 UTC (rev 31617)
@@ -127,8 +127,17 @@
 void PmvPlayer::handleEvents() {
 	Common::Event event;
 	while (_system->getEventManager()->pollEvent(event)) {
-		if (event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) {
-			_abort = true;
+		switch (event.type) {
+		case Common::EVENT_KEYDOWN:
+			if (event.kbd.keycode == Common::KEYCODE_ESCAPE)
+				_abort = true;
+			break;
+		case Common::EVENT_QUIT:
+			// TODO: Exit more gracefully
+			g_system->quit();
+			break;
+		default:
+			break;
 		}
 	}
 }

Modified: scummvm/trunk/engines/made/scriptfuncs.cpp
===================================================================
--- scummvm/trunk/engines/made/scriptfuncs.cpp	2008-04-20 16:12:46 UTC (rev 31616)
+++ scummvm/trunk/engines/made/scriptfuncs.cpp	2008-04-20 16:18:50 UTC (rev 31617)
@@ -240,6 +240,11 @@
 			}
 			break;
 
+		case Common::EVENT_QUIT:
+			// TODO: Exit more gracefully.
+			g_system->quit();
+			break;
+
 		default:
 			break;
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list