CDVD: Add configurable directory for blockdumps storage

Previously the blockdumps will be automatically stored in the root directory of PCSX2, added an INI option in "PCSX2_ui.ini" named "CurrentBlockdump" to modify the directory to whatever is preferred by the user. (Some people were requesting for this)

A GUI could also be added if anyone wants, but considering the popularity of this I'm not sure as blockdumps will only be used my less percentile of users and mostly by testers and developers for debugging.
This commit is contained in:
Akash 2019-06-30 11:48:12 +05:30
parent ba2efec983
commit 7290576a2a
3 changed files with 6 additions and 3 deletions

View File

@ -370,8 +370,6 @@ bool DoCDVDopen()
return true;
}
// TODO: Add a blockdumps configurable folder, and use that instead of CWD().
// TODO: "Untitled" should use pnach/slus name resolution, slus if no patch,
// and finally an "Untitled-[ElfCRC]" if no slus.
@ -379,7 +377,10 @@ bool DoCDVDopen()
if( somepick.IsEmpty() )
somepick = L"Untitled";
wxString temp( Path::Combine( wxGetCwd(), somepick ) );
if (g_Conf->CurrentBlockdump.IsEmpty())
g_Conf->CurrentBlockdump = wxGetCwd();
wxString temp(Path::Combine(g_Conf->CurrentBlockdump, somepick));
#ifdef ENABLE_TIMESTAMPS
wxDateTime curtime( wxDateTime::GetTimeNow() );

View File

@ -640,6 +640,7 @@ void AppConfig::LoadSaveRootItems( IniInterface& ini )
ini.Entry( L"CurrentIso", res, res, ini.IsLoading() || IsPortable() );
CurrentIso = res.GetFullPath();
IniEntry( CurrentBlockdump );
IniEntry( CurrentELF );
IniEntry( CurrentIRX );

View File

@ -323,6 +323,7 @@ public:
bool AskOnBoot;
wxString CurrentIso;
wxString CurrentBlockdump;
wxString CurrentELF;
wxString CurrentIRX;
CDVD_SourceType CdvdSource;