[Scummvm-cvs-logs] SF.net SVN: scummvm: [29576] scummvm/trunk/engines/lure

dreammaster at users.sourceforge.net dreammaster at users.sourceforge.net
Tue Nov 20 13:26:07 CET 2007


Revision: 29576
          http://scummvm.svn.sourceforge.net/scummvm/?rev=29576&view=rev
Author:   dreammaster
Date:     2007-11-20 04:26:06 -0800 (Tue, 20 Nov 2007)

Log Message:
-----------
Changed calls to pollEvent to be in while loops to ensure all pending events get processed

Modified Paths:
--------------
    scummvm/trunk/engines/lure/events.cpp
    scummvm/trunk/engines/lure/game.cpp
    scummvm/trunk/engines/lure/menu.cpp
    scummvm/trunk/engines/lure/surface.cpp

Modified: scummvm/trunk/engines/lure/events.cpp
===================================================================
--- scummvm/trunk/engines/lure/events.cpp	2007-11-20 00:26:36 UTC (rev 29575)
+++ scummvm/trunk/engines/lure/events.cpp	2007-11-20 12:26:06 UTC (rev 29576)
@@ -132,7 +132,7 @@
 	Events &e = Events::getReference();
 
 	do {
-		e.pollEvent();
+		while (e.pollEvent() && !e.quitFlag) ;
 		g_system->delayMillis(20);
 	} while (!e.quitFlag && (lButton() || rButton()));
 }
@@ -180,7 +180,7 @@
 void Events::waitForPress() {
 	bool keyButton = false;
 	while (!keyButton) {
-		if (pollEvent()) {
+		while (pollEvent()) {
 			if (_event.type == Common::EVENT_QUIT) return;
 			else if (_event.type == Common::EVENT_KEYDOWN) keyButton = true;
 			else if ((_event.type == Common::EVENT_LBUTTONDOWN) ||

Modified: scummvm/trunk/engines/lure/game.cpp
===================================================================
--- scummvm/trunk/engines/lure/game.cpp	2007-11-20 00:26:36 UTC (rev 29575)
+++ scummvm/trunk/engines/lure/game.cpp	2007-11-20 12:26:06 UTC (rev 29576)
@@ -964,7 +964,7 @@
 	bool result = false; 
 
 	do {
-		if (events.pollEvent()) {
+		while (events.pollEvent()) {
 			if (events.event().type == Common::EVENT_KEYDOWN) {
 				Common::KeyCode key = events.event().kbd.keycode;
 				if ((key == y) || (key == Common::KEYCODE_n) ||

Modified: scummvm/trunk/engines/lure/menu.cpp
===================================================================
--- scummvm/trunk/engines/lure/menu.cpp	2007-11-20 00:26:36 UTC (rev 29575)
+++ scummvm/trunk/engines/lure/menu.cpp	2007-11-20 12:26:06 UTC (rev 29576)
@@ -66,6 +66,8 @@
 //	{EN_ANY, {{40, 87, 20, 80}, {127, 179, 100, 120}, {224, 281, 210, 105}}},
 	{EN_ANY, {{40, 87, 3, 7}, {127, 179, 13, 12}, {224, 281, 27, 10}}},
 	{IT_ITA, {{40, 98, 4, 6}, {120, 195, 14, 11}, {208, 281, 24, 13}}},
+	{FR_FRA, {{40, 90, 3, 7}, {120, 195, 13, 11}, {232, 273, 23, 13}}},
+	{DE_DEU, {{40, 90, 4, 7}, {120, 195, 13, 12}, {232, 273, 21, 15}}},
 	{UNK_LANG, {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}}
 };
 

Modified: scummvm/trunk/engines/lure/surface.cpp
===================================================================
--- scummvm/trunk/engines/lure/surface.cpp	2007-11-20 00:26:36 UTC (rev 29575)
+++ scummvm/trunk/engines/lure/surface.cpp	2007-11-20 12:26:06 UTC (rev 29576)
@@ -425,7 +425,7 @@
 			abortFlag = events.quitFlag;
 			if (abortFlag) break;
 
-			if (events.pollEvent()) {
+			while (events.pollEvent()) {
 				if (events.type() == Common::EVENT_KEYDOWN) {
 					char ch = events.event().kbd.ascii;
 					uint16 keycode = events.event().kbd.keycode;
@@ -729,7 +729,7 @@
 			abortFlag = events.quitFlag;
 			if (abortFlag) break;
 
-			if (events.pollEvent()) {
+			while (events.pollEvent()) {
 				if ((events.type() == Common::EVENT_KEYDOWN) &&
 					(events.event().kbd.keycode == Common::KEYCODE_ESCAPE)) {
 					abortFlag = true;
@@ -1052,7 +1052,7 @@
 		_charIndex = 0;
 
 		while (!events.quitFlag) {
-			if (events.pollEvent()) {
+			while (events.pollEvent()) {
 				if (events.type() == Common::EVENT_KEYDOWN) { 
 					if ((events.event().kbd.keycode == Common::KEYCODE_BACKSPACE) && (_charIndex > 0)) {
 						// Remove the last number typed


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