diff options
author | gameblabla | 2019-10-07 07:11:14 +0200 |
---|---|---|
committer | gameblabla | 2019-10-07 07:11:14 +0200 |
commit | 9bc385d3c340f4d42d393254200510ae7f9534dc (patch) | |
tree | 47032f818458c8bc05d9766a8a57e82ce83af517 /shell | |
parent | d4753076e89d42cdad4a4f1ca4688fad3c56d873 (diff) | |
download | snesemu-9bc385d3c340f4d42d393254200510ae7f9534dc.tar.gz snesemu-9bc385d3c340f4d42d393254200510ae7f9534dc.tar.bz2 snesemu-9bc385d3c340f4d42d393254200510ae7f9534dc.zip |
Make sure it uses our configuration input things.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/input/sdl/input.c | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/shell/input/sdl/input.c b/shell/input/sdl/input.c index 357f7d1..b2b78e7 100644 --- a/shell/input/sdl/input.c +++ b/shell/input/sdl/input.c @@ -34,18 +34,18 @@ uint32_t S9xReadJoypad(int32_t port) SDL_Event event; static const uint32_t snes_lut[] = { - SNES_B_MASK, - SNES_Y_MASK, - SNES_SELECT_MASK, - SNES_START_MASK, - SNES_UP_MASK, - SNES_DOWN_MASK, - SNES_LEFT_MASK, - SNES_RIGHT_MASK, - SNES_A_MASK, - SNES_X_MASK, - SNES_TL_MASK, - SNES_TR_MASK + SNES_B_MASK, + SNES_Y_MASK, + SNES_SELECT_MASK, + SNES_START_MASK, + SNES_UP_MASK, + SNES_DOWN_MASK, + SNES_LEFT_MASK, + SNES_RIGHT_MASK, + SNES_A_MASK, + SNES_X_MASK, + SNES_TL_MASK, + SNES_TR_MASK }; int32_t i; @@ -55,20 +55,20 @@ uint32_t S9xReadJoypad(int32_t port) SDL_PollEvent(&event); - CASE(SDLK_RETURN, SNES_START_MASK); - CASE(SDLK_ESCAPE, SNES_SELECT_MASK); - CASE(SDLK_LCTRL, SNES_A_MASK); - CASE(SDLK_LALT, SNES_B_MASK); - CASE(SDLK_LSHIFT, SNES_X_MASK); - CASE(SDLK_SPACE, SNES_Y_MASK); - CASE(SDLK_TAB, SNES_TL_MASK); - CASE(SDLK_BACKSPACE, SNES_TR_MASK); - CASE(SDLK_UP, SNES_UP_MASK); - CASE(SDLK_LEFT, SNES_LEFT_MASK); - CASE(SDLK_RIGHT, SNES_RIGHT_MASK); - CASE(SDLK_DOWN, SNES_DOWN_MASK); + CASE(option.config_buttons[0][10], SNES_START_MASK); + CASE(option.config_buttons[0][11], SNES_SELECT_MASK); + CASE(option.config_buttons[0][4], SNES_A_MASK); + CASE(option.config_buttons[0][5], SNES_B_MASK); + CASE(option.config_buttons[0][6], SNES_X_MASK); + CASE(option.config_buttons[0][7], SNES_Y_MASK); + CASE(option.config_buttons[0][8], SNES_TL_MASK); + CASE(option.config_buttons[0][9], SNES_TR_MASK); + CASE(option.config_buttons[0][0], SNES_UP_MASK); + CASE(option.config_buttons[0][1], SNES_DOWN_MASK); + CASE(option.config_buttons[0][2], SNES_LEFT_MASK); + CASE(option.config_buttons[0][3], SNES_RIGHT_MASK); if (keystate[SDLK_END]) emulator_state = 1; - return joypad; + return joypad; } |