[Scummvm-cvs-logs] CVS: scummvm/sword1 control.cpp,1.62,1.63

Robert Göffringmann lavosspawn at users.sourceforge.net
Tue Oct 25 23:17:35 CEST 2005


Update of /cvsroot/scummvm/scummvm/sword1
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25266/sword1

Modified Files:
	control.cpp 
Log Message:
fix for bug #1328022: BS1: savegame name text input ignores keypresses

Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sword1/control.cpp,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- control.cpp	18 Oct 2005 01:30:24 -0000	1.62
+++ control.cpp	26 Oct 2005 06:16:14 -0000	1.63
@@ -312,12 +312,7 @@
 			_system->copyRectToScreen(_screenBuf, SCREEN_WIDTH, 0, 0, SCREEN_WIDTH, 480);
 		}
 		_system->updateScreen();
-		// Use shorter delay when editing savegames names to minimize
-		// the risk of keypresses being lost.
-		if (mode == BUTTON_SAVE_PANEL && _selectedSavegame < 255)
-			delay(20);
-		else
-			delay(1000 / 12);
+		delay(1000 / 12);
 		newMode = getClicks(mode, &retVal);
 	} while ((newMode != BUTTON_DONE) && (retVal == 0) && (!SwordEngine::_systemVars.engineQuit));
 	destroyButtons();
@@ -1047,7 +1042,9 @@
 					_keyPressed = (byte)event.kbd.ascii;
 				_keyRepeatTime = now + kKeyRepeatInitialDelay;
 				_keyRepeat = _keyPressed;
-				break;
+				// we skip the rest of the delay and return immediately
+				// to handle keyboard input
+				return;
 			case OSystem::EVENT_KEYUP:
 				_keyRepeatTime = 0;
 				_keyRepeat = 0;





More information about the Scummvm-git-logs mailing list