diff options
author | D G Turner | 2014-04-29 00:22:54 +0100 |
---|---|---|
committer | D G Turner | 2014-04-29 00:22:54 +0100 |
commit | 4ebbdaa59ba446d1ad69be083dad73b54691920a (patch) | |
tree | 227b92a61ba851cdaaf00292e2c10127b4fbe0f1 /backends/events/linuxmotosdl/linuxmotosdl-events.cpp | |
parent | 3ae0908967a3c5d526e139bb1a5da82da4793776 (diff) | |
download | scummvm-rg350-4ebbdaa59ba446d1ad69be083dad73b54691920a.tar.gz scummvm-rg350-4ebbdaa59ba446d1ad69be083dad73b54691920a.tar.bz2 scummvm-rg350-4ebbdaa59ba446d1ad69be083dad73b54691920a.zip |
LINUXMOTO: Use virtual keyboard event directly, rather than using keycode.
As the virtual keyboard trigger has been moved to CTRL-F7, the previous
code which generates a unmodified F7 event to do this will not work.
Rather than just adding the CTRL modifier, this code changes the
backend to directly generate the virtual keyboard trigger event
directly. This avoids any future breakage if the key combination is
changed again.
Diffstat (limited to 'backends/events/linuxmotosdl/linuxmotosdl-events.cpp')
-rw-r--r-- | backends/events/linuxmotosdl/linuxmotosdl-events.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp index ce34662612..b0d443ff9f 100644 --- a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp +++ b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp @@ -73,7 +73,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { } // VirtualKeyboard - Camera key else if (ev.key.keysym.sym == SDLK_PAUSE) { - ev.key.keysym.sym = SDLK_F7; +#ifdef ENABLE_VKEYBD + event.type = Common::EVENT_VIRTUAL_KEYBOARD; + return true; +#endif } // Enter - mod+fire key else if (ev.key.keysym.sym == SDLK_b) { @@ -117,7 +120,10 @@ bool LinuxmotoSdlEventSource::remapKey(SDL_Event &ev, Common::Event &event) { } // VirtualKeyboard - Right Soft key else if (ev.key.keysym.sym == SDLK_F11) { - ev.key.keysym.sym = SDLK_F7; +#ifdef ENABLE_VKEYBD + event.type = Common::EVENT_VIRTUAL_KEYBOARD; + return true; +#endif } #endif |