Wx: Reinitialize folders after running first time wizard

This commit is contained in:
Connor McLaughlin 2021-10-05 20:15:49 +10:00 committed by refractionpcsx2
parent d440360906
commit 0ccad56ee6
2 changed files with 17 additions and 9 deletions

View File

@ -727,6 +727,12 @@ void AppConfig::FolderOptions::LoadSave(IniInterface& ini)
for (int i = 0; i < FolderId_COUNT; ++i)
operator[]((FoldersEnum_t)i).Normalize();
AppSetEmuFolders();
}
}
void AppSetEmuFolders()
{
EmuFolders::Settings = GetSettingsFolder();
EmuFolders::Bios = GetResolvedFolder(FolderId_Bios);
EmuFolders::Snapshots = GetResolvedFolder(FolderId_Snapshots);
@ -737,7 +743,6 @@ void AppConfig::FolderOptions::LoadSave(IniInterface& ini)
EmuFolders::Cheats = GetResolvedFolder(FolderId_Cheats);
EmuFolders::CheatsWS = GetResolvedFolder(FolderId_CheatsWS);
}
}
// ------------------------------------------------------------------------
AppConfig::GSWindowOptions::GSWindowOptions()
@ -1080,6 +1085,8 @@ void AppConfig_OnChangedSettingsFolder(bool overwrite)
if (!overwrite)
AppLoadSettings();
else
AppSetEmuFolders();
AppApplySettings();
AppSaveSettings(); //Make sure both ini files are created if needed.

View File

@ -316,6 +316,7 @@ public:
extern void AppLoadSettings();
extern void AppSaveSettings();
extern void AppApplySettings( const AppConfig* oldconf=NULL );
extern void AppSetEmuFolders();
extern void App_LoadSaveInstallSettings( IniInterface& ini );
extern void App_SaveInstallSettings( wxConfigBase* ini );