mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
added check if "file open dialog" changes the working directory. i dunno why but some times the file open dialog changes my working directory... the code is for further investigations
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2408 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -407,6 +407,9 @@ void CFrame::OnOpen(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
void CFrame::DoOpen(bool Boot)
|
||||
{
|
||||
std::string currentDir;
|
||||
File::GetCurrentDirectory(currentDir);
|
||||
|
||||
wxString path = wxFileSelector(
|
||||
_T("Select the file to load"),
|
||||
wxEmptyString, wxEmptyString, wxEmptyString,
|
||||
@ -423,6 +426,16 @@ void CFrame::DoOpen(bool Boot)
|
||||
return;
|
||||
}
|
||||
|
||||
std::string currentDir2;
|
||||
File::GetCurrentDirectory(currentDir2);
|
||||
|
||||
if (currentDir != currentDir2)
|
||||
{
|
||||
PanicAlert("Current dir changed has been changeg from %s to %s after wxFileSelector!",currentDir.c_str(),currentDir2.c_str());
|
||||
File::SetCurrentDirectory(currentDir);
|
||||
}
|
||||
|
||||
|
||||
// Should we boot a new game or just change the disc?
|
||||
if(Boot)
|
||||
{
|
||||
|
Reference in New Issue
Block a user