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,18 +727,23 @@ void AppConfig::FolderOptions::LoadSave(IniInterface& ini)
for (int i = 0; i < FolderId_COUNT; ++i)
operator[]((FoldersEnum_t)i).Normalize();
EmuFolders::Settings = GetSettingsFolder();
EmuFolders::Bios = GetResolvedFolder(FolderId_Bios);
EmuFolders::Snapshots = GetResolvedFolder(FolderId_Snapshots);
EmuFolders::Savestates = GetResolvedFolder(FolderId_Savestates);
EmuFolders::MemoryCards = GetResolvedFolder(FolderId_MemoryCards);
EmuFolders::Logs = GetResolvedFolder(FolderId_Logs);
EmuFolders::Langs = GetResolvedFolder(FolderId_Langs);
EmuFolders::Cheats = GetResolvedFolder(FolderId_Cheats);
EmuFolders::CheatsWS = GetResolvedFolder(FolderId_CheatsWS);
AppSetEmuFolders();
}
}
void AppSetEmuFolders()
{
EmuFolders::Settings = GetSettingsFolder();
EmuFolders::Bios = GetResolvedFolder(FolderId_Bios);
EmuFolders::Snapshots = GetResolvedFolder(FolderId_Snapshots);
EmuFolders::Savestates = GetResolvedFolder(FolderId_Savestates);
EmuFolders::MemoryCards = GetResolvedFolder(FolderId_MemoryCards);
EmuFolders::Logs = GetResolvedFolder(FolderId_Logs);
EmuFolders::Langs = GetResolvedFolder(FolderId_Langs);
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 );