SDL: Remove scancode key input

This commit is contained in:
Jeffrey Pfau 2016-09-23 14:43:05 -07:00
parent 8daa39d21b
commit 1073e6cc8e
2 changed files with 1 additions and 15 deletions

View File

@ -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:

View File

@ -127,17 +127,6 @@ void mSDLInitBindingsGBA(struct mInputMap* inputMap) {
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 _pauseAfterFrame(struct mCoreThread* context) {
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) {