all repos — mgba @ c96c1f62116208d2ac6c939e507b503d09c256ef

mGBA Game Boy Advance Emulator

Qt: Fix some cases where key mapping can break if focus is adjusted
Jeffrey Pfau jeffrey@endrift.com
Sun, 04 Jan 2015 22:30:23 -0800
commit

c96c1f62116208d2ac6c939e507b503d09c256ef

parent

4fdb4991f4552001a42b4200d8ff3d83ef1279ea

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

jump to
M CHANGESCHANGES

@@ -40,6 +40,7 @@ - GBA Video: Fix sprite boundary conditions with mosaic

- Video: Fix FFmpeg crashing when the file extension is wrong - GBA Audio: Fix GB audio channels being too quiet (fixes #159) - Qt: Fix a race condition when a game crashes immediately + - Qt: Fix some cases where key mapping can break if focus is adjusted Misc: - Qt: Disable sync to video by default - GBA: Exit cleanly on FATAL if the port supports it
M src/platform/qt/GBAKeyEditor.cppsrc/platform/qt/GBAKeyEditor.cpp

@@ -143,12 +143,10 @@ painter.drawPicture(0, 0, m_background);

} void GBAKeyEditor::setNext() { + findFocus(); + if (m_currentKey == m_keyOrder.end()) { return; - } - - if (!(*m_currentKey)->hasFocus()) { - m_currentKey = m_keyOrder.end(); } ++m_currentKey;