mirror of https://github.com/mgba-emu/mgba.git
Qt: Merge findFocus from master
This commit is contained in:
parent
388c94a569
commit
13de6dfdc7
|
@ -179,6 +179,20 @@ void GBAKeyEditor::save() {
|
|||
m_controller->saveConfiguration(m_type);
|
||||
}
|
||||
|
||||
bool GBAKeyEditor::findFocus() {
|
||||
if (m_currentKey != m_keyOrder.end() && (*m_currentKey)->hasFocus()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (auto key = m_keyOrder.begin(); key != m_keyOrder.end(); ++key) {
|
||||
if ((*key)->hasFocus()) {
|
||||
m_currentKey = key;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef BUILD_SDL
|
||||
void GBAKeyEditor::testGamepad() {
|
||||
QSet<int> activeKeys = m_controller->activeGamepadButtons();
|
||||
|
|
|
@ -31,6 +31,7 @@ protected:
|
|||
private slots:
|
||||
void setNext();
|
||||
void save();
|
||||
bool findFocus();
|
||||
#ifdef BUILD_SDL
|
||||
void testGamepad();
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue