mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix some cases where key mapping can break if focus is adjusted
This commit is contained in:
parent
4fdb4991f4
commit
c96c1f6211
1
CHANGES
1
CHANGES
|
@ -40,6 +40,7 @@ Bugfixes:
|
||||||
- Video: Fix FFmpeg crashing when the file extension is wrong
|
- Video: Fix FFmpeg crashing when the file extension is wrong
|
||||||
- GBA Audio: Fix GB audio channels being too quiet (fixes #159)
|
- GBA Audio: Fix GB audio channels being too quiet (fixes #159)
|
||||||
- Qt: Fix a race condition when a game crashes immediately
|
- Qt: Fix a race condition when a game crashes immediately
|
||||||
|
- Qt: Fix some cases where key mapping can break if focus is adjusted
|
||||||
Misc:
|
Misc:
|
||||||
- Qt: Disable sync to video by default
|
- Qt: Disable sync to video by default
|
||||||
- GBA: Exit cleanly on FATAL if the port supports it
|
- GBA: Exit cleanly on FATAL if the port supports it
|
||||||
|
|
|
@ -143,14 +143,12 @@ void GBAKeyEditor::paintEvent(QPaintEvent* event) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBAKeyEditor::setNext() {
|
void GBAKeyEditor::setNext() {
|
||||||
|
findFocus();
|
||||||
|
|
||||||
if (m_currentKey == m_keyOrder.end()) {
|
if (m_currentKey == m_keyOrder.end()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(*m_currentKey)->hasFocus()) {
|
|
||||||
m_currentKey = m_keyOrder.end();
|
|
||||||
}
|
|
||||||
|
|
||||||
++m_currentKey;
|
++m_currentKey;
|
||||||
if (m_currentKey != m_keyOrder.end()) {
|
if (m_currentKey != m_keyOrder.end()) {
|
||||||
(*m_currentKey)->setFocus();
|
(*m_currentKey)->setFocus();
|
||||||
|
|
Loading…
Reference in New Issue