diff options
author | Tarek Soliman | 2012-02-15 16:13:35 -0600 |
---|---|---|
committer | Tarek Soliman | 2012-02-15 16:38:53 -0600 |
commit | 7ae7e8073972dfbfc5d450b1a2b43134f3c64d27 (patch) | |
tree | bd0af35de098be5f4deefea1e1dadaa36c6892a5 | |
parent | 856744aa6a8d10ea62807a28df24f539fd8f2d06 (diff) | |
download | scummvm-rg350-7ae7e8073972dfbfc5d450b1a2b43134f3c64d27.tar.gz scummvm-rg350-7ae7e8073972dfbfc5d450b1a2b43134f3c64d27.tar.bz2 scummvm-rg350-7ae7e8073972dfbfc5d450b1a2b43134f3c64d27.zip |
MAEMO: Rename hasHwKeyboard and add hasMenuKey
-rw-r--r-- | backends/events/maemosdl/maemosdl-events.cpp | 6 | ||||
-rw-r--r-- | backends/platform/maemo/maemo-common.h | 15 |
2 files changed, 11 insertions, 10 deletions
diff --git a/backends/events/maemosdl/maemosdl-events.cpp b/backends/events/maemosdl/maemosdl-events.cpp index 756125a41c..057205ee2c 100644 --- a/backends/events/maemosdl/maemosdl-events.cpp +++ b/backends/events/maemosdl/maemosdl-events.cpp @@ -36,7 +36,7 @@ MaemoSdlEventSource::MaemoSdlEventSource() : SdlEventSource(), _clickEnabled(tru bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { Model model = Model(((OSystem_SDL_Maemo *)g_system)->getModel()); - debug(10, "Model: %s %u %s %s", model.hwId, model.modelType, model.hwAlias, model.hwKeyboard ? "true" : "false"); + debug(10, "Model: %s %u %s %s", model.hwId, model.modelType, model.hwAlias, model.hasHwKeyboard ? "true" : "false"); // List of special N810 keys: // SDLK_F4 -> menu @@ -56,7 +56,7 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { debug(9, "remapping to main menu"); return true; } else if (ev.key.keysym.sym == SDLK_F6) { - if (!model.hwKeyboard) { + if (!model.hasHwKeyboard) { event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_F7; event.kbd.ascii = Common::ASCII_F7; @@ -95,7 +95,7 @@ bool MaemoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { event.type = Common::EVENT_MAINMENU; return true; } else if (ev.key.keysym.sym == SDLK_F6) { - if (!model.hwKeyboard) { + if (!model.hasHwKeyboard) { event.type = Common::EVENT_KEYUP; event.kbd.keycode = Common::KEYCODE_F7; event.kbd.ascii = Common::ASCII_F7; diff --git a/backends/platform/maemo/maemo-common.h b/backends/platform/maemo/maemo-common.h index 30279bc2ef..453c70c45f 100644 --- a/backends/platform/maemo/maemo-common.h +++ b/backends/platform/maemo/maemo-common.h @@ -39,16 +39,17 @@ struct Model { const char *hwId; ModelType modelType; const char *hwAlias; - bool hwKeyboard; + bool hasHwKeyboard; + bool hasMenuKey; }; static const Model models[] = { - {"SU-18", kModelType770, "770", false}, - {"RX-34", kModelTypeN800, "N800", false}, - {"RX-44", kModelTypeN810, "N810", true}, - {"RX-48", kModelTypeN810, "N810W", true}, - {"RX-51", kModelTypeN900, "N900", true}, - {0, kModelTypeInvalid, 0, true} + {"SU-18", kModelType770, "770", false, true}, + {"RX-34", kModelTypeN800, "N800", false, true}, + {"RX-44", kModelTypeN810, "N810", true, true}, + {"RX-48", kModelTypeN810, "N810W", true, true}, + {"RX-51", kModelTypeN900, "N900", true, false}, + {0, kModelTypeInvalid, 0, true, true} }; enum CustomEventType { |