aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/events/sdl/sdl-events.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp
index 6c4774554c..ff5f4b9ce3 100644
--- a/backends/events/sdl/sdl-events.cpp
+++ b/backends/events/sdl/sdl-events.cpp
@@ -170,8 +170,14 @@ int SdlEventSource::mapKey(SDLKey sdlKey, SDLMod mod, Uint16 unicode) {
if (key >= Common::KEYCODE_F1 && key <= Common::KEYCODE_F9) {
return key - Common::KEYCODE_F1 + Common::ASCII_F1;
} else if (key >= Common::KEYCODE_KP0 && key <= Common::KEYCODE_KP9) {
- if ((mod & KMOD_NUM) == 0)
- return 0; // In case Num-Lock is NOT enabled, return 0 for ascii, so that directional keys on numpad work
+ // WORKAROUND: Disable this change for AmigaOS4 as it is breaking numpad usage ("fighting") on that platform.
+ // This fixes bug #10558.
+ // The actual issue here is that the SCUMM engine uses ASCII codes instead of keycodes for input.
+ // See also the relevant FIXME in SCUMM's input.cpp.
+ #ifndef __amigaos4__
+ if ((mod & KMOD_NUM) == 0)
+ return 0; // In case Num-Lock is NOT enabled, return 0 for ascii, so that directional keys on numpad work
+ #endif
return key - Common::KEYCODE_KP0 + '0';
} else if (key >= Common::KEYCODE_UP && key <= Common::KEYCODE_PAGEDOWN) {
return key;