mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
Achievements: Fix crash when toggling off with list open
This commit is contained in:
parent
5568de1e03
commit
065472ddda
|
@ -372,6 +372,8 @@ void CommonHost::CheckForSettingsChanges(const Settings& old_settings)
|
||||||
Achievements::UpdateSettings(old_settings);
|
Achievements::UpdateSettings(old_settings);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
FullscreenUI::CheckForConfigChanges(old_settings);
|
||||||
|
|
||||||
if (g_settings.log_level != old_settings.log_level || g_settings.log_filter != old_settings.log_filter ||
|
if (g_settings.log_level != old_settings.log_level || g_settings.log_filter != old_settings.log_filter ||
|
||||||
g_settings.log_to_console != old_settings.log_to_console ||
|
g_settings.log_to_console != old_settings.log_to_console ||
|
||||||
g_settings.log_to_debug != old_settings.log_to_debug || g_settings.log_to_window != old_settings.log_to_window ||
|
g_settings.log_to_debug != old_settings.log_to_debug || g_settings.log_to_window != old_settings.log_to_window ||
|
||||||
|
|
|
@ -578,6 +578,19 @@ bool FullscreenUI::HasActiveWindow()
|
||||||
ImGuiFullscreen::IsChoiceDialogOpen() || ImGuiFullscreen::IsFileSelectorOpen());
|
ImGuiFullscreen::IsChoiceDialogOpen() || ImGuiFullscreen::IsFileSelectorOpen());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FullscreenUI::CheckForConfigChanges(const Settings& old_settings)
|
||||||
|
{
|
||||||
|
if (!IsInitialized())
|
||||||
|
return;
|
||||||
|
|
||||||
|
#ifdef WITH_CHEEVOS
|
||||||
|
// If achievements got disabled, we might have the menu open...
|
||||||
|
// That means we're going to be reading achievement state.
|
||||||
|
if (old_settings.achievements_enabled && !g_settings.achievements_enabled)
|
||||||
|
ReturnToMainWindow();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void FullscreenUI::OnSystemStarted()
|
void FullscreenUI::OnSystemStarted()
|
||||||
{
|
{
|
||||||
if (!IsInitialized())
|
if (!IsInitialized())
|
||||||
|
|
|
@ -6,10 +6,13 @@
|
||||||
|
|
||||||
class HostDisplayTexture;
|
class HostDisplayTexture;
|
||||||
|
|
||||||
|
struct Settings;
|
||||||
|
|
||||||
namespace FullscreenUI {
|
namespace FullscreenUI {
|
||||||
bool Initialize();
|
bool Initialize();
|
||||||
bool IsInitialized();
|
bool IsInitialized();
|
||||||
bool HasActiveWindow();
|
bool HasActiveWindow();
|
||||||
|
void CheckForConfigChanges(const Settings& old_settings);
|
||||||
void OnSystemStarted();
|
void OnSystemStarted();
|
||||||
void OnSystemPaused();
|
void OnSystemPaused();
|
||||||
void OnSystemResumed();
|
void OnSystemResumed();
|
||||||
|
|
Loading…
Reference in a new issue