all repos — mgba @ 500eeb7ee3c06b0e3a2433eeaad67261736ac1f5

mGBA Game Boy Advance Emulator

GBA Input: Unbind axes at the appropriate time
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Jul 2015 23:59:53 -0700
commit

500eeb7ee3c06b0e3a2433eeaad67261736ac1f5

parent

e9c82df5187212025d930d862beb523f373c74ed

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

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

@@ -366,7 +366,6 @@ }

if (impl) { impl->map[input] = GBA_NO_MAPPING; } - TableEnumerate(&impl->axes, _unbindAxis, &input); } int GBAInputQueryBinding(const struct GBAInputMap* map, uint32_t type, enum GBAKey input) {

@@ -420,6 +419,8 @@ }

void GBAInputBindAxis(struct GBAInputMap* map, uint32_t type, int axis, const struct GBAAxis* description) { struct GBAInputMapImpl* impl = _guaranteeMap(map, type); + TableEnumerate(&impl->axes, _unbindAxis, &description->highDirection); + TableEnumerate(&impl->axes, _unbindAxis, &description->lowDirection); struct GBAAxis* dup = malloc(sizeof(struct GBAAxis)); *dup = *description; TableInsert(&impl->axes, axis, dup);