[Scummvm-cvs-logs] SF.net SVN: scummvm: [30358] scummvm/trunk/engines/saga/interface.cpp

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Wed Jan 9 22:26:38 CET 2008


Revision: 30358
          http://scummvm.svn.sourceforge.net/scummvm/?rev=30358&view=rev
Author:   thebluegr
Date:     2008-01-09 13:26:38 -0800 (Wed, 09 Jan 2008)

Log Message:
-----------
Added handling of home/end keys in input dialogs and properly filtered out non-alphanumeric keys

Modified Paths:
--------------
    scummvm/trunk/engines/saga/interface.cpp

Modified: scummvm/trunk/engines/saga/interface.cpp
===================================================================
--- scummvm/trunk/engines/saga/interface.cpp	2008-01-09 21:15:34 UTC (rev 30357)
+++ scummvm/trunk/engines/saga/interface.cpp	2008-01-09 21:26:38 UTC (rev 30358)
@@ -1189,8 +1189,14 @@
 			_textInputPos++;
 		}
 		break;
+	case Common::KEYCODE_HOME:
+		_textInputPos = 1;
+		break;
+	case Common::KEYCODE_END:
+		_textInputPos = _textInputStringLength + 1;
+		break;
 	default:
-		if (isalnum(keystate.ascii) || (keystate.ascii == ' ') ||
+		if (keystate.ascii <= 255 && isalnum(keystate.ascii) || (keystate.ascii == ' ') ||
 		    (keystate.ascii == '-') || (keystate.ascii == '_')) {
 			if (_textInputStringLength < save_title_size - 1) {
 				ch[0] = keystate.ascii;


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