mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 15:01:16 +01:00
Decouple Hardcore from EmulationStateChanged
Rerendering the entire Achievements dialog every EmulationStateChanged signal is far too often when it turns out that signal fires multiple times to confirm game close, for example. This change results in only the settings changing on EmulationStateChanged, and having the Hardcore mode toggle (which DOES require redrawing the entire dialog) emit its own signal alongside EmulationStateChanged.
This commit is contained in:
parent
0cc1d4c62d
commit
29f1b82f5e
@ -237,7 +237,10 @@ void AchievementSettingsWidget::ToggleRAIntegration()
|
|||||||
else
|
else
|
||||||
instance.Shutdown();
|
instance.Shutdown();
|
||||||
if (Config::Get(Config::RA_HARDCORE_ENABLED))
|
if (Config::Get(Config::RA_HARDCORE_ENABLED))
|
||||||
|
{
|
||||||
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
||||||
|
emit Settings::Instance().HardcoreStateChanged();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AchievementSettingsWidget::Login()
|
void AchievementSettingsWidget::Login()
|
||||||
@ -267,6 +270,7 @@ void AchievementSettingsWidget::ToggleHardcore()
|
|||||||
Settings::Instance().SetDebugModeEnabled(false);
|
Settings::Instance().SetDebugModeEnabled(false);
|
||||||
}
|
}
|
||||||
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
emit Settings::Instance().EmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
||||||
|
emit Settings::Instance().HardcoreStateChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AchievementSettingsWidget::ToggleUnofficial()
|
void AchievementSettingsWidget::ToggleUnofficial()
|
||||||
|
@ -34,6 +34,8 @@ AchievementsWindow::AchievementsWindow(QWidget* parent) : QDialog(parent)
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||||
|
[this] { m_settings_widget->UpdateData(); });
|
||||||
|
connect(&Settings::Instance(), &Settings::HardcoreStateChanged, this,
|
||||||
[this] { AchievementsWindow::UpdateData({.all = true}); });
|
[this] { AchievementsWindow::UpdateData({.all = true}); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,6 +224,7 @@ signals:
|
|||||||
void SDCardInsertionChanged(bool inserted);
|
void SDCardInsertionChanged(bool inserted);
|
||||||
void USBKeyboardConnectionChanged(bool connected);
|
void USBKeyboardConnectionChanged(bool connected);
|
||||||
void EnableGfxModsChanged(bool enabled);
|
void EnableGfxModsChanged(bool enabled);
|
||||||
|
void HardcoreStateChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Settings();
|
Settings();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user