[Scummvm-cvs-logs] SF.net SVN: scummvm: [22997] scummvm/trunk/gui/KeysDialog.cpp
anotherguest at users.sourceforge.net
anotherguest at users.sourceforge.net
Sat Jun 10 09:21:31 CEST 2006
Revision: 22997
Author: anotherguest
Date: 2006-06-10 00:21:26 -0700 (Sat, 10 Jun 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=22997&view=rev
Log Message:
-----------
Return proper keynames for Symbian keymapping
Modified Paths:
--------------
scummvm/trunk/gui/KeysDialog.cpp
Modified: scummvm/trunk/gui/KeysDialog.cpp
===================================================================
--- scummvm/trunk/gui/KeysDialog.cpp 2006-06-10 01:09:48 UTC (rev 22996)
+++ scummvm/trunk/gui/KeysDialog.cpp 2006-06-10 07:21:26 UTC (rev 22997)
@@ -85,6 +85,14 @@
char selection[100];
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected());
+
+ if(key != 0) {
+ // ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
+ if(key >= 315 && key <= 323) {
+ key = key - 315 + SDLK_F1;
+ }
+ }
+
if(key != 0)
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key));
else
@@ -106,8 +114,14 @@
_actionSelected = _actionsList->getSelected();
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionSelected);
- if(key != 0)
+ if(key != 0) {
+ // ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
+ if(key >= 315 && key <= 323) {
+ key = key - 315 + SDLK_F1;
+ }
+
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key));
+ }
else
sprintf(selection, "Associated key : none");
#else
@@ -150,7 +164,7 @@
Actions::Instance()->setMapping((ActionType)_actionSelected, ascii);
#ifdef __SYMBIAN32__
if(ascii != 0)
- sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)ascii));
+ sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey) keycode));
else
sprintf(selection, "Associated key : none");
#else
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