all repos — mgba @ 2805cc5fea6605916d020a5bd7f7f448fd2bc553

mGBA Game Boy Advance Emulator

Fix gamepad input
Jeffrey Pfau jeffrey@endrift.com
Tue, 12 Aug 2014 22:50:24 -0700
commit

2805cc5fea6605916d020a5bd7f7f448fd2bc553

parent

9ac58c69968c2d4a166b74f486fd0b8086cdbc55

3 files changed, 4 insertions(+), 3 deletions(-)

jump to
M src/gba/gba-input.csrc/gba/gba-input.c

@@ -75,6 +75,7 @@ for (m = map->numMaps * 2 - 1; m > map->numMaps; --m) {

map->maps[m].type = 0; map->maps[m].map = 0; } + map->numMaps *= 2; impl = &map->maps[m]; impl->type = type; impl->map = calloc(GBA_KEY_MAX, sizeof(enum GBAKey));
M src/platform/sdl/sdl-events.csrc/platform/sdl/sdl-events.c

@@ -14,9 +14,6 @@ #else

#define GUI_MOD KMOD_CTRL #endif -#define SDL_BINDING_KEY 0x53444C4B -#define SDL_BINDING_BUTTON 0x53444C42 - bool GBASDLInitEvents(struct GBASDLEvents* context) { if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0) { return false;
M src/platform/sdl/sdl-events.hsrc/platform/sdl/sdl-events.h

@@ -7,6 +7,9 @@ #include "gba-thread.h"

#include <SDL.h> +#define SDL_BINDING_KEY 0x53444C4B +#define SDL_BINDING_BUTTON 0x53444C42 + struct GBAVideoSoftwareRenderer; struct GBASDLEvents {