Qt: Clean and remove empty game settings

This commit is contained in:
Stenzek
2024-04-25 14:02:16 +10:00
parent d6ffdb0242
commit 1cdfca155d
23 changed files with 247 additions and 47 deletions

View File

@ -278,8 +278,7 @@ void ControllerSettingsWindow::setBoolValue(const char* section, const char* key
if (m_profile_interface)
{
m_profile_interface->SetBoolValue(section, key, value);
m_profile_interface->Save();
g_emu_thread->reloadGameSettings();
saveAndReloadGameSettings();
}
else
{
@ -294,8 +293,7 @@ void ControllerSettingsWindow::setIntValue(const char* section, const char* key,
if (m_profile_interface)
{
m_profile_interface->SetIntValue(section, key, value);
m_profile_interface->Save();
g_emu_thread->reloadGameSettings();
saveAndReloadGameSettings();
}
else
{
@ -310,8 +308,7 @@ void ControllerSettingsWindow::setStringValue(const char* section, const char* k
if (m_profile_interface)
{
m_profile_interface->SetStringValue(section, key, value);
m_profile_interface->Save();
g_emu_thread->reloadGameSettings();
saveAndReloadGameSettings();
}
else
{
@ -321,6 +318,13 @@ void ControllerSettingsWindow::setStringValue(const char* section, const char* k
}
}
void ControllerSettingsWindow::saveAndReloadGameSettings()
{
DebugAssert(m_profile_interface);
QtHost::SaveGameSettings(m_profile_interface.get(), false);
g_emu_thread->reloadGameSettings(false);
}
void ControllerSettingsWindow::clearSettingValue(const char* section, const char* key)
{
if (m_profile_interface)