CommonHostInterface: Ensure game list is loaded before booting

Fixes a possible race/crash when starting with a filename in NoGUI.
This commit is contained in:
Connor McLaughlin 2021-02-18 18:02:20 +10:00
parent d4bbef5021
commit 8c7aec2edf
1 changed files with 4 additions and 0 deletions

View File

@ -139,6 +139,10 @@ void CommonHostInterface::InitializeUserDirectory()
bool CommonHostInterface::BootSystem(const SystemBootParameters& parameters)
{
// If the fullscreen UI is enabled, make sure it's finished loading the game list so we don't race it.
if (m_fullscreen_ui_enabled)
FullscreenUI::EnsureGameListLoaded();
if (!HostInterface::BootSystem(parameters))
{
// if in batch mode, exit immediately if booting failed