diff options
-rw-r--r-- | melonDS.cbp | 4 | ||||
-rw-r--r-- | src/wx/scancode_wx2sdl.h | 27 |
2 files changed, 20 insertions, 11 deletions
diff --git a/melonDS.cbp b/melonDS.cbp index 6b71338..ebb8bdc 100644 --- a/melonDS.cbp +++ b/melonDS.cbp @@ -40,8 +40,10 @@ <Add option="-Wall" /> <Add option="-m64" /> <Add option="-fexceptions" /> + <Add option="-pipe" /> <Add option="-I$(TARGET_COMPILER_DIR)/lib/wx/include/msw-unicode-static-3.0 -I$(TARGET_COMPILER_DIR)/include/wx-3.0" /> - <Add option="-D_FILE_OFFSET_BITS=64 -D__WXMSW__ -pipe" /> + <Add option="-D_FILE_OFFSET_BITS=64" /> + <Add option="-D__WXMSW__" /> </Compiler> <Linker> <Add option="-m64" /> diff --git a/src/wx/scancode_wx2sdl.h b/src/wx/scancode_wx2sdl.h index 466548d..1091a1c 100644 --- a/src/wx/scancode_wx2sdl.h +++ b/src/wx/scancode_wx2sdl.h @@ -299,26 +299,33 @@ SDL_Scancode scancode_wx2sdl(wxKeyEvent& event) int keysym = event.GetRawKeyCode(); - if (keysym == NoSymbol) { + if (keysym == NoSymbol) + { return SDL_SCANCODE_UNKNOWN; } - if (keysym >= GDK_a && keysym <= GDK_z) { - return SDL_SCANCODE_A + (keysym - GDK_a); + if (keysym >= GDK_a && keysym <= GDK_z) + { + return (SDL_Scancode)(SDL_SCANCODE_A + (keysym - GDK_a)); } - if (keysym >= GDK_A && keysym <= GDK_Z) { - return SDL_SCANCODE_A + (keysym - GDK_A); + if (keysym >= GDK_A && keysym <= GDK_Z) + { + return (SDL_Scancode)(SDL_SCANCODE_A + (keysym - GDK_A)); } - if (keysym == GDK_0) { + if (keysym == GDK_0) + { return SDL_SCANCODE_0; } - if (keysym >= GDK_1 && keysym <= GDK_9) { - return SDL_SCANCODE_1 + (keysym - GDK_1); + if (keysym >= GDK_1 && keysym <= GDK_9) + { + return (SDL_Scancode)(SDL_SCANCODE_1 + (keysym - GDK_1)); } - for (i = 0; i < SDL_arraysize(KeySymToSDLScancode); ++i) { - if (keysym == KeySymToSDLScancode[i].keysym) { + for (i = 0; i < SDL_arraysize(KeySymToSDLScancode); ++i) + { + if (keysym == KeySymToSDLScancode[i].keysym) + { return KeySymToSDLScancode[i].scancode; } } |