mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
make working dir save to a platform specific file
fix a possible buffer overflow in MemcardManager when creating a gci savename fix Previous Page button from being available after deleting the last save on page 2 remove magic numbers from GCMemcard git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3819 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -132,7 +132,12 @@ bool DolphinApp::OnInit()
|
||||
if (!noCheckForInstallDir)
|
||||
{
|
||||
char tmp[1024];
|
||||
sprintf(tmp, "%s/.dolphinwd", (const char*)wxStandardPaths::Get().GetUserConfigDir().mb_str(wxConvUTF8));
|
||||
sprintf(tmp, "%s/.dolphin%swd", (const char*)wxStandardPaths::Get().GetUserConfigDir().mb_str(wxConvUTF8),
|
||||
#ifdef _M_IX86
|
||||
"x32");
|
||||
#else
|
||||
"x64");
|
||||
#endif
|
||||
FILE* workingDir = fopen(tmp, "r");
|
||||
if (!workingDir)
|
||||
{
|
||||
@ -174,7 +179,7 @@ bool DolphinApp::OnInit()
|
||||
fclose(workingDir);
|
||||
if (!wxSetWorkingDirectory(wxString::FromAscii(tmpChar)))
|
||||
{
|
||||
PanicAlert("set working directory failed");
|
||||
INFO_LOG(CONSOLE, "set working directory failed");
|
||||
}
|
||||
delete [] tmpChar;
|
||||
}
|
||||
|
Reference in New Issue
Block a user