all repos — mgba @ 8c1194244d298f3b546a85220f139db539667077

mGBA Game Boy Advance Emulator

Qt: Fix analog buttons not getting unmapped
Jeffrey Pfau jeffrey@endrift.com
Sat, 25 Jul 2015 22:02:16 -0700
commit

8c1194244d298f3b546a85220f139db539667077

parent

24a910c9d3add3d82df03479dca39b76e62d1ac0

M CHANGESCHANGES

@@ -63,6 +63,7 @@ - ARM7: ARMHotplugDetach should call deinit

- Qt: Fix window being too tall after exiting fullscreen - Qt: Fix a missing va_end call in the log handler lambda within the GameController constructor - GBA Cheats: Fix Pro Action Replay and GameShark issues when used together + - Qt: Fix analog buttons not getting unmapped Misc: - Qt: Handle saving input settings better - Debugger: Free watchpoints in addition to breakpoints
M src/platform/qt/GBAKeyEditor.cppsrc/platform/qt/GBAKeyEditor.cpp

@@ -197,6 +197,10 @@ }

} void GBAKeyEditor::save() { +#ifdef BUILD_SDL + m_controller->unbindAllAxes(m_type); +#endif + bindKey(m_keyDU, GBA_KEY_UP); bindKey(m_keyDD, GBA_KEY_DOWN); bindKey(m_keyDL, GBA_KEY_LEFT);
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -413,6 +413,10 @@ }

GBAInputBindAxis(&m_inputMap, type, axis, &description); } +void InputController::unbindAllAxes(uint32_t type) { + GBAInputUnbindAllAxes(&m_inputMap, type); +} + void InputController::testGamepad(int type) { auto activeAxes = activeGamepadAxes(type); auto oldAxes = m_activeAxes;
M src/platform/qt/InputController.hsrc/platform/qt/InputController.h

@@ -60,6 +60,7 @@ QSet<QPair<int, GamepadAxisEvent::Direction>> activeGamepadAxes(int type);

void recalibrateAxes(); void bindAxis(uint32_t type, int axis, GamepadAxisEvent::Direction, GBAKey); + void unbindAllAxes(uint32_t type); QStringList connectedGamepads(uint32_t type) const; int gamepad(uint32_t type) const;