mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-16 00:55:47 -04:00
Qt: Add migration of old controller binds to new
This commit is contained in:
@ -166,6 +166,7 @@ bool QtHost::InitializeConfig(std::string settings_filename)
|
||||
}
|
||||
|
||||
s_base_settings_interface->SetUIntValue("Main", "SettingsVersion", SETTINGS_VERSION);
|
||||
s_base_settings_interface->SetBoolValue("ControllerPorts", "ControllerSettingsMigrated", true);
|
||||
SetDefaultSettings(*s_base_settings_interface, true, true);
|
||||
s_base_settings_interface->Save();
|
||||
}
|
||||
@ -180,6 +181,14 @@ bool QtHost::InitializeConfig(std::string settings_filename)
|
||||
Log::SetConsoleOutputParams(true, nullptr, LOGLEVEL_NONE);
|
||||
}
|
||||
|
||||
// TEMPORARY: Migrate controller settings to new interface.
|
||||
if (!s_base_settings_interface->GetBoolValue("ControllerPorts", "ControllerSettingsMigrated", false))
|
||||
{
|
||||
s_base_settings_interface->SetBoolValue("ControllerPorts", "ControllerSettingsMigrated", true);
|
||||
if (InputManager::MigrateBindings(*s_base_settings_interface.get()))
|
||||
s_base_settings_interface->Save();
|
||||
}
|
||||
|
||||
InstallTranslator();
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user