CommonHostInterface: Prevent crash with fullscreen UI enabled

This commit is contained in:
Connor McLaughlin 2021-05-14 13:26:06 +10:00
parent dda2cccb1c
commit 1f206421e8
3 changed files with 8 additions and 1 deletions

View File

@ -2702,7 +2702,8 @@ void CommonHostInterface::LoadSettings(SettingsInterface& si)
}
else if (m_fullscreen_ui_enabled)
{
FullscreenUI::UpdateSettings();
if (FullscreenUI::IsInitialized())
FullscreenUI::UpdateSettings();
}
const bool input_display_enabled = si.GetBoolValue("Display", "ShowInputs", false);

View File

@ -231,6 +231,11 @@ bool Initialize(CommonHostInterface* host_interface)
return true;
}
bool IsInitialized()
{
return (s_host_interface != nullptr);
}
bool HasActiveWindow()
{
return s_current_main_window != MainWindowType::None || s_save_state_selector_open ||

View File

@ -40,6 +40,7 @@ enum class SettingsPage
};
bool Initialize(CommonHostInterface* host_interface);
bool IsInitialized();
bool HasActiveWindow();
void UpdateSettings();
void SystemCreated();