diff options
author | Jonathan Gray | 2004-01-22 04:31:31 +0000 |
---|---|---|
committer | Jonathan Gray | 2004-01-22 04:31:31 +0000 |
commit | 978ba89095927d8471c10d6c9bdb050f7dc33c56 (patch) | |
tree | 10b1202f1aca05246ee30f1158663efea57e147d /backends/sdl | |
parent | 45739906a573b5e246f581512efed2d935b05336 (diff) | |
download | scummvm-rg350-978ba89095927d8471c10d6c9bdb050f7dc33c56.tar.gz scummvm-rg350-978ba89095927d8471c10d6c9bdb050f7dc33c56.tar.bz2 scummvm-rg350-978ba89095927d8471c10d6c9bdb050f7dc33c56.zip |
patch #878551 from Gael Le Mignot, adds key mappings for yopy PDAs, a host option to the configure script for cross compilation and sdl prefix option. Also remove obsolete sdlgl option from configure script and change the --disable-bs options to be --disable-sword to be consistent while I'm here
svn-id: r12572
Diffstat (limited to 'backends/sdl')
-rw-r--r-- | backends/sdl/sdl-common.cpp | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp index 87d2faf228..2010b78f88 100644 --- a/backends/sdl/sdl-common.cpp +++ b/backends/sdl/sdl-common.cpp @@ -19,14 +19,19 @@ * */ -#include "sdl-common.h" +#include "backends/sdl/sdl-common.h" #include "sound/mididrv.h" #include "common/config-manager.h" #include "common/scaler.h" #include "common/util.h" +#if defined(HAVE_CONFIG_H) +#include "config.h" +#endif + #include "scummvm.xpm" + // FIXME move joystick defines out and replace with confile file options // we should really allow users to map any key to a joystick button #define JOY_DEADZONE 3200 @@ -595,12 +600,21 @@ bool OSystem_SDL_Common::poll_event(Event *event) { while(SDL_PollEvent(&ev)) { switch(ev.type) { case SDL_KEYDOWN: +#ifdef LINUPY + // Yopy has no ALT key, steal the SHIFT key + // (which isn't used much anyway) + if (ev.key.keysym.mod & KMOD_SHIFT) + b |= KBD_ALT; + if (ev.key.keysym.mod & KMOD_CTRL) + b |= KBD_CTRL; +#else if (ev.key.keysym.mod & KMOD_SHIFT) b |= KBD_SHIFT; if (ev.key.keysym.mod & KMOD_CTRL) b |= KBD_CTRL; if (ev.key.keysym.mod & KMOD_ALT) b |= KBD_ALT; +#endif event->kbd.flags = b; // Alt-Return toggles full screen mode @@ -714,6 +728,35 @@ bool OSystem_SDL_Common::poll_event(Event *event) { } } +#ifdef LINUPY + // On Yopy map the End button to quit + if ((ev.key.keysym.sym==293)) { + event->event_code = EVENT_QUIT; + return true; + } + // Map menu key to f5 (scumm menu) + if (ev.key.keysym.sym==306) { + event->event_code = EVENT_KEYDOWN; + event->kbd.keycode = SDLK_F5; + event->kbd.ascii = mapKey(SDLK_F5, ev.key.keysym.mod, 0); + return true; + } + // Map action key to action + if (ev.key.keysym.sym==291) { + event->event_code = EVENT_KEYDOWN; + event->kbd.keycode = SDLK_TAB; + event->kbd.ascii = mapKey(SDLK_TAB, ev.key.keysym.mod, 0); + return true; + } + // Map OK key to skip cinematic + if (ev.key.keysym.sym==292) { + event->event_code = EVENT_KEYDOWN; + event->kbd.keycode = SDLK_ESCAPE; + event->kbd.ascii = mapKey(SDLK_ESCAPE, ev.key.keysym.mod, 0); + return true; + } +#endif + #ifdef QTOPIA // quit on fn+backspace on zaurus if (ev.key.keysym.sym == 127) { |