diff options
author | Max Horn | 2007-06-22 20:04:44 +0000 |
---|---|---|
committer | Max Horn | 2007-06-22 20:04:44 +0000 |
commit | 2b23374468549722c8068d448d9bbf5e100d7301 (patch) | |
tree | 0f932d85abb78a4dc9ecc93799ab7763753f3243 /gui/KeysDialog.cpp | |
parent | 2496c5b5549f7b3b3f1d7777812631505f8d578f (diff) | |
download | scummvm-rg350-2b23374468549722c8068d448d9bbf5e100d7301.tar.gz scummvm-rg350-2b23374468549722c8068d448d9bbf5e100d7301.tar.bz2 scummvm-rg350-2b23374468549722c8068d448d9bbf5e100d7301.zip |
Converted lots of code to use Common::ASCII_* and COMMON::KEYCODE_* constants. This also revealed the evil mixing of keycodes and ascii we do in many places :-/
svn-id: r27616
Diffstat (limited to 'gui/KeysDialog.cpp')
-rw-r--r-- | gui/KeysDialog.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/gui/KeysDialog.cpp b/gui/KeysDialog.cpp index 6093af684d..33d09e4e69 100644 --- a/gui/KeysDialog.cpp +++ b/gui/KeysDialog.cpp @@ -77,8 +77,8 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected()); #ifdef __SYMBIAN32__ // 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 >= Common::ASCII_F1 && key <= Common::ASCII_F9) + key = key - Common::ASCII_F1 + SDLK_F1; #endif if (key != 0) sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key)); @@ -92,16 +92,15 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { case kMapCmd: if (_actionsList->getSelected() < 0) { _actionTitle->setLabel("Please select an action"); - } - else { + } else { char selection[100]; _actionSelected = _actionsList->getSelected(); uint16 key = Actions::Instance()->getMapping(_actionSelected); #ifdef __SYMBIAN32__ // 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 >= Common::ASCII_F1 && key <= Common::ASCII_F9) + key = key - Common::ASCII_F1 + SDLK_F1; #endif if (key != 0) sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key)); |