Fix cheats path and folder creation

For the install version on Linux, PCSX2 now searches for cheats in $HOME
instead of /usr. For the install version on Windows, PCSX2 now searches
for cheats in Documents/PCSX2 instead of the cheats directory where
PCSX2 is installed.

Also make a few small consistency changes.
This commit is contained in:
Jonathan Li 2015-08-20 20:28:47 +01:00
parent 60a90aa51c
commit 55eebb5fd2
2 changed files with 16 additions and 2 deletions

View File

@ -72,6 +72,18 @@ namespace PathDefs
return retval;
}
const wxDirName& Bios()
{
static const wxDirName retval(L"bios");
return retval;
}
const wxDirName& Cheats()
{
static const wxDirName retval(L"cheats");
return retval;
}
const wxDirName& CheatsWS()
{
static const wxDirName retval(L"cheats_ws");
@ -184,12 +196,12 @@ namespace PathDefs
wxDirName GetBios()
{
return GetDocuments() + wxDirName( L"bios" );
return GetDocuments() + Base::Bios();;
}
wxDirName GetCheats()
{
return AppRoot() + wxDirName( L"cheats" );
return GetDocuments() + Base::Cheats();
}
wxDirName GetCheatsWS()
@ -722,6 +734,7 @@ AppConfig::FolderOptions::FolderOptions()
, MemoryCards ( PathDefs::GetMemoryCards() )
, Langs ( PathDefs::GetLangs() )
, Logs ( PathDefs::GetLogs() )
, Cheats ( PathDefs::GetCheats() )
, CheatsWS ( PathDefs::GetCheatsWS() )
, RunIso( PathDefs::GetDocuments() ) // raw default is always the Documents folder.

View File

@ -834,6 +834,7 @@ void AppApplySettings( const AppConfig* oldconf )
g_Conf->Folders.MemoryCards.Mkdir();
g_Conf->Folders.Savestates.Mkdir();
g_Conf->Folders.Snapshots.Mkdir();
g_Conf->Folders.Cheats.Mkdir();
g_Conf->Folders.CheatsWS.Mkdir();
g_Conf->EmuOptions.BiosFilename = g_Conf->FullpathToBios();