aboutsummaryrefslogtreecommitdiff
path: root/shell/input/sdl/input.c
diff options
context:
space:
mode:
authorneonloop2021-03-11 23:51:42 +0000
committerneonloop2021-03-11 23:51:42 +0000
commitd9c7509a8ed5f190743abeb4ce6702f0549abde3 (patch)
tree9a99ba093da651852a203472629d98a47ca49c69 /shell/input/sdl/input.c
parentc057cb5ed6ffed8a9b88158a9e0e77608b46813f (diff)
downloadsnesemu-d9c7509a8ed5f190743abeb4ce6702f0549abde3.tar.gz
snesemu-d9c7509a8ed5f190743abeb4ce6702f0549abde3.tar.bz2
snesemu-d9c7509a8ed5f190743abeb4ce6702f0549abde3.zip
Makes button names symbolic for easier overriding
This puts platform-specific overrides in a central location and makes button references easier to understand.
Diffstat (limited to 'shell/input/sdl/input.c')
-rw-r--r--shell/input/sdl/input.c7
1 files changed, 4 insertions, 3 deletions
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;
}