Changed how portable install handles "Clear all settings" so it doesn't remove the portable.ini anymore.

Instead it resets the flag for running the first time wizard.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4356 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2011-02-24 21:50:17 +00:00
parent 0744d4e309
commit 253cd9becf
1 changed files with 10 additions and 12 deletions

View File

@ -200,24 +200,22 @@ void Pcsx2App::WipeUserModeSettings()
{
if (InstallationMode == InstallMode_Portable)
{
// Remove the user local portable ini definition (if possible).
// If the user does not have admin rights to the PCSX2 folder, removing the file may fail.
// Reset RunWizard so the FTWizard is run again on next PCSX2 start.
// If the user does not have admin rights to the PCSX2 folder, writing to the file may fail.
// PCSX2 does checks for admin rights on start-up if the file is found, though,
// so there should (in theory) be no sane way for this to error if we're running
// in portable mode.
wxFileName portableIniFile( GetPortableIniPath() );
if (portableIniFile.FileExists())
wxRemoveFile(portableIniFile.GetFullPath());
ScopedPtr<wxFileConfig> conf_portable( OpenFileConfig( portableIniFile.GetFullPath() ) );
conf_portable->Write( L"RunWizard", true );
}
else
{
// Remove the app-local / registry entry conforming to this instance of PCSX2.
// Remove this regardless if PCSX2 is in portable mode, since otherwise these settings
// would be used when the user restarts PCSX2, and that might be undesirable.
ScopedPtr<wxConfigBase> conf_install( OpenInstallSettingsFile() );
conf_install->DeleteEntry(L"RunWizard");
}
}
static void DoFirstTimeWizard()
{