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
d99a58a857
commit
388c94a569
1
CHANGES
1
CHANGES
|
@ -24,6 +24,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
|
||||||
|
|
|
@ -151,14 +151,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