mirror of https://github.com/PCSX2/pcsx2.git
Bugfixed some of the ini creation code on startup.
Bugfixed a memory leak when running blockdumps. git-svn-id: http://pcsx2.googlecode.com/svn/trunk@2015 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
5c930fcb55
commit
04b3657ca1
|
@ -428,6 +428,7 @@ void isoClose(isoFile *iso)
|
|||
if (iso->handle) _closefile(iso->handle);
|
||||
if (iso->htable) _closefile(iso->htable);
|
||||
safe_free( iso->buffer );
|
||||
safe_free( iso->dtable );
|
||||
safe_free( iso );
|
||||
}
|
||||
|
||||
|
|
|
@ -542,12 +542,16 @@ void RelocateLogfile()
|
|||
//
|
||||
void AppConfig_OnChangedSettingsFolder( bool overwrite )
|
||||
{
|
||||
PathDefs::GetDocuments().Mkdir();
|
||||
PathDefs::GetSettings().Mkdir();
|
||||
if( !UseAdminMode )
|
||||
PathDefs::GetDocuments().Mkdir();
|
||||
|
||||
GetSettingsFolder().Mkdir();
|
||||
|
||||
const wxString iniFilename( GetSettingsFilename() );
|
||||
|
||||
if( overwrite )
|
||||
{
|
||||
if( !wxRemoveFile( GetSettingsFilename() ) )
|
||||
if( wxFileExists( iniFilename ) && !wxRemoveFile( iniFilename ) )
|
||||
throw Exception::AccessDenied( "Failed to overwrite settings; permission to file was denied." );
|
||||
}
|
||||
|
||||
|
@ -556,7 +560,7 @@ void AppConfig_OnChangedSettingsFolder( bool overwrite )
|
|||
|
||||
// Bind into wxConfigBase to allow wx to use our config internally, and delete whatever
|
||||
// comes out (cleans up prev config, if one).
|
||||
delete wxConfigBase::Set( OpenFileConfig( GetSettingsFilename() ) );
|
||||
delete wxConfigBase::Set( OpenFileConfig( iniFilename ) );
|
||||
GetAppConfig()->SetRecordDefaults();
|
||||
|
||||
//wxGetApp().Source_SettingsChanged().Dispatch( SettingsEvt_IniOpening );
|
||||
|
|
|
@ -316,6 +316,8 @@ void AppApplySettings( const AppConfig* oldconf, bool saveOnSuccess )
|
|||
{
|
||||
AllowFromMainThreadOnly();
|
||||
|
||||
g_Conf->Folders.ApplyDefaults();
|
||||
|
||||
// Ensure existence of necessary documents folders. Plugins and other parts
|
||||
// of PCSX2 rely on them.
|
||||
|
||||
|
|
Loading…
Reference in New Issue