From d9c7509a8ed5f190743abeb4ce6702f0549abde3 Mon Sep 17 00:00:00 2001 From: neonloop Date: Thu, 11 Mar 2021 23:51:42 +0000 Subject: Makes button names symbolic for easier overriding This puts platform-specific overrides in a central location and makes button references easier to understand. --- shell/input/sdl/input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'shell/input') diff --git a/shell/input/sdl/input.c b/shell/input/sdl/input.c index a4ceba3..077d053 100644 --- a/shell/input/sdl/input.c +++ b/shell/input/sdl/input.c @@ -17,6 +17,7 @@ #include "menu.h" #include "config.h" +#include "buttons.h" uint8_t *keystate; uint8_t exit_snes = 0; @@ -62,8 +63,8 @@ uint32_t S9xReadJoypad(int32_t port) case SDL_KEYDOWN: switch(event.key.keysym.sym) { - case SDLK_ESCAPE: - case SDLK_END: + case BTN_MENU: + case BTN_L2: emulator_state = 1; break; } @@ -71,7 +72,7 @@ uint32_t S9xReadJoypad(int32_t port) case SDL_KEYUP: switch(event.key.keysym.sym) { - case SDLK_HOME: + case BTN_HOME: emulator_state = 1; break; } -- cgit v1.2.3