HostInterface: Fix crash on startup with controller connected

This commit is contained in:
Connor McLaughlin
2020-04-06 12:18:33 +10:00
parent f41475ae8f
commit e91d760175
8 changed files with 49 additions and 35 deletions

View File

@ -61,6 +61,7 @@ bool HostInterface::Initialize()
{
SetUserDirectory();
InitializeUserDirectory();
LoadSettings();
m_game_list = std::make_unique<GameList>();
m_game_list->SetCacheFilename(GetGameListCacheFileName());
m_game_list->SetDatabaseFilename(GetGameListDatabaseFileName());

View File

@ -158,8 +158,8 @@ protected:
/// Sets the base path for the user directory. Can be overridden by platform/frontend/command line.
virtual void SetUserDirectory();
/// Ensures all subdirectories of the user directory are created.
void CreateUserDirectorySubdirectories();
/// Performs the initial load of settings. Should call CheckSettings() and m_settings.Load().
virtual void LoadSettings() = 0;
/// Returns the path of the settings file.
std::string GetSettingsFileName() const;