diff options
author | Lars Persson | 2006-06-10 07:21:26 +0000 |
---|---|---|
committer | Lars Persson | 2006-06-10 07:21:26 +0000 |
commit | eca46382d553800c43ec12e5d48299d101bb34be (patch) | |
tree | cee7b19c66bab8392db8168354869b5aa66a00be /gui | |
parent | 64c1e0dd9c5d45959515d682289e76b8d38c1a4b (diff) | |
download | scummvm-rg350-eca46382d553800c43ec12e5d48299d101bb34be.tar.gz scummvm-rg350-eca46382d553800c43ec12e5d48299d101bb34be.tar.bz2 scummvm-rg350-eca46382d553800c43ec12e5d48299d101bb34be.zip |
Return proper keynames for Symbian keymapping
svn-id: r22997
Diffstat (limited to 'gui')
-rw-r--r-- | gui/KeysDialog.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp index 80d9602d82..c8abe1087b 100644 --- a/gui/KeysDialog.cpp +++ b/gui/KeysDialog.cpp @@ -85,6 +85,14 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { 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 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { _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 @@ void KeysDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) { 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 |