all repos — mgba @ 1073e6cc8ef4b63b9950b3439d65a17e2268c633

mGBA Game Boy Advance Emulator

SDL: Remove scancode key input
Jeffrey Pfau jeffrey@endrift.com
Fri, 23 Sep 2016 14:43:05 -0700
commit

1073e6cc8ef4b63b9950b3439d65a17e2268c633

parent

8daa39d21b1dccac49e7dc5ab419819836bbf93d

2 files changed, 1 insertions(+), 15 deletions(-)

jump to
M CHANGESCHANGES

@@ -16,6 +16,7 @@ Misc:

- All: Only update version info if needed - FFmpeg: Encoding cleanup - GB Memory: Initialize RAM pattern for GBC + - SDL: Remove scancode key input 0.5.0: (2016-09-19) Features:
M src/platform/sdl/sdl-events.csrc/platform/sdl/sdl-events.c

@@ -127,17 +127,6 @@ mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_UP, GBA_KEY_UP);

mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_DOWN, GBA_KEY_DOWN); mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_LEFT, GBA_KEY_LEFT); mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_RIGHT, GBA_KEY_RIGHT); -#elif SDL_VERSION_ATLEAST(2, 0, 0) - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_X, GBA_KEY_A); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_Z, GBA_KEY_B); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_A, GBA_KEY_L); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_S, GBA_KEY_R); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_RETURN, GBA_KEY_START); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_BACKSPACE, GBA_KEY_SELECT); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_UP, GBA_KEY_UP); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_DOWN, GBA_KEY_DOWN); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_LEFT, GBA_KEY_LEFT); - mInputBindKey(inputMap, SDL_BINDING_KEY, SDL_SCANCODE_RIGHT, GBA_KEY_RIGHT); #else mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_x, GBA_KEY_A); mInputBindKey(inputMap, SDL_BINDING_KEY, SDLK_z, GBA_KEY_B);

@@ -390,11 +379,7 @@

static void _mSDLHandleKeypress(struct mCoreThread* context, struct mSDLPlayer* sdlContext, const struct SDL_KeyboardEvent* event) { int key = -1; if (!event->keysym.mod) { -#if !defined(BUILD_PANDORA) && SDL_VERSION_ATLEAST(2, 0, 0) - key = mInputMapKey(sdlContext->bindings, SDL_BINDING_KEY, event->keysym.scancode); -#else key = mInputMapKey(sdlContext->bindings, SDL_BINDING_KEY, event->keysym.sym); -#endif } if (key != -1) { if (event->type == SDL_KEYDOWN) {