[Scummvm-cvs-logs] SF.net SVN: scummvm:[52254] scummvm/trunk/engines/sci/graphics/controls.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Sat Aug 21 13:11:54 CEST 2010


Revision: 52254
          http://scummvm.svn.sourceforge.net/scummvm/?rev=52254&view=rev
Author:   thebluegr
Date:     2010-08-21 11:11:54 +0000 (Sat, 21 Aug 2010)

Log Message:
-----------
SCI: add support for Control-C in earlier SCI games, too

Modified Paths:
--------------
    scummvm/trunk/engines/sci/graphics/controls.cpp

Modified: scummvm/trunk/engines/sci/graphics/controls.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/controls.cpp	2010-08-21 11:03:09 UTC (rev 52253)
+++ scummvm/trunk/engines/sci/graphics/controls.cpp	2010-08-21 11:11:54 UTC (rev 52254)
@@ -197,7 +197,7 @@
 					cursorPos++; textChanged = true;
 				}
 				break;
-			case 3:	// a bit odd, but this is what is returned when Control - C is pressed
+			case 3:	// returned in SCI1 late and newer when Control - C is pressed
 				if (modifiers & SCI_KEYMOD_CTRL) {
 					// Control-C erases the whole line
 					cursorPos = 0; text.clear();
@@ -205,7 +205,12 @@
 				}
 				break;
 			default:
-				if (eventKey > 31 && eventKey < 256 && textSize < maxChars) {
+				if ((modifiers & SCI_KEYMOD_CTRL) && eventKey == 99) {
+					// Control-C in earlier SCI games (SCI0 - SCI1 middle)
+					// Control-C erases the whole line
+					cursorPos = 0; text.clear();
+					textChanged = true;
+				} else if (eventKey > 31 && eventKey < 256 && textSize < maxChars) {
 					// insert pressed character
 					textAddChar = true;
 					textChanged = true;


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