GBA Input: Unbind axes at the appropriate time
Jeffrey Pfau jeffrey@endrift.com
Thu, 23 Jul 2015 23:59:53 -0700
1 files changed,
2 insertions(+),
1 deletions(-)
jump to
M
src/gba/input.c
→
src/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);