mirror of https://github.com/mgba-emu/mgba.git
Qt: Actually load defaults again
This commit is contained in:
parent
5ff777d301
commit
fb7ad7dbfb
|
@ -172,15 +172,16 @@ void InputController::setConfiguration(ConfigController* config) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputController::loadConfiguration(uint32_t type) {
|
bool InputController::loadConfiguration(uint32_t type) {
|
||||||
if (!mInputMapLoad(&m_inputMap, type, m_config->input())) {
|
bool loaded = mInputMapLoad(&m_inputMap, type, m_config->input());
|
||||||
return false;
|
|
||||||
}
|
|
||||||
auto driver = m_inputDrivers.value(type);
|
auto driver = m_inputDrivers.value(type);
|
||||||
if (!driver) {
|
if (!driver) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (!loaded) {
|
||||||
|
driver->bindDefaults(this);
|
||||||
|
}
|
||||||
driver->loadConfiguration(m_config);
|
driver->loadConfiguration(m_config);
|
||||||
return true;
|
return loaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InputController::loadProfile(uint32_t type, const QString& profile) {
|
bool InputController::loadProfile(uint32_t type, const QString& profile) {
|
||||||
|
|
Loading…
Reference in New Issue