mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2025-02-17 03:15:39 +00:00
CommonHostInterface: Fix crash on shutdown when using save state selector
This commit is contained in:
parent
e731c87757
commit
9bb278b166
|
@ -48,7 +48,11 @@ bool HostInterface::Initialize()
|
|||
return true;
|
||||
}
|
||||
|
||||
void HostInterface::Shutdown() {}
|
||||
void HostInterface::Shutdown()
|
||||
{
|
||||
if (!System::IsShutdown())
|
||||
System::Shutdown();
|
||||
}
|
||||
|
||||
void HostInterface::CreateAudioStream()
|
||||
{
|
||||
|
|
|
@ -87,18 +87,10 @@ void CommonHostInterface::Shutdown()
|
|||
{
|
||||
HostInterface::Shutdown();
|
||||
|
||||
// this has gpu objects so it has to come first
|
||||
m_save_state_selector_ui.reset();
|
||||
|
||||
#ifdef WITH_DISCORD_PRESENCE
|
||||
ShutdownDiscordPresence();
|
||||
#endif
|
||||
|
||||
System::Shutdown();
|
||||
m_audio_stream.reset();
|
||||
if (m_display)
|
||||
ReleaseHostDisplay();
|
||||
|
||||
if (m_controller_interface)
|
||||
{
|
||||
m_controller_interface->Shutdown();
|
||||
|
@ -177,6 +169,7 @@ void CommonHostInterface::PauseSystem(bool paused)
|
|||
void CommonHostInterface::DestroySystem()
|
||||
{
|
||||
SetTimerResolutionIncreased(false);
|
||||
m_save_state_selector_ui->Close();
|
||||
|
||||
HostInterface::DestroySystem();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ void SaveStateSelectorUI::Close()
|
|||
return;
|
||||
|
||||
m_open = false;
|
||||
ClearList();
|
||||
}
|
||||
|
||||
void SaveStateSelectorUI::ClearList()
|
||||
|
|
Loading…
Reference in a new issue