From 2b23374468549722c8068d448d9bbf5e100d7301 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 22 Jun 2007 20:04:44 +0000 Subject: 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 --- gui/KeysDialog.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'gui/KeysDialog.cpp') 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)); -- cgit v1.2.3