summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2009-08-11 12:09:46 +0000
committerShawn Hoffman <godisgovernment@gmail.com>2009-08-11 12:09:46 +0000
commit379f690438d52d72e89f075933a2ff9b16ba44b5 (patch)
treeb892d59070a4f4f2cd8e9c51e352e5465f4d5ffb /Source/Core
parent5be34cd7e5c55a6c59d8b532c42485eed58cccf1 (diff)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3960 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Src/Main.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp
index fdbd8cf9c2..178f69dd82 100644
--- a/Source/Core/DolphinWX/Src/Main.cpp
+++ b/Source/Core/DolphinWX/Src/Main.cpp
@@ -124,7 +124,7 @@ bool DolphinApp::OnInit()
}
#ifndef __APPLE__
// Keep the user config dir free unless user wants to save the working dir
- if (File::Exists(FULL_CONFIG_DIR "portable"))
+ if (!File::Exists(FULL_CONFIG_DIR "portable"))
{
char tmp[1024];
sprintf(tmp, "%s/.dolphin%swd", (const char*)wxStandardPaths::Get().GetUserConfigDir().mb_str(),
@@ -143,6 +143,7 @@ bool DolphinApp::OnInit()
{
PanicAlert("Portable Setting could not be saved\n Are you running Dolphin from read only media or from a directory that dolphin is not located in?");
}
+ fclose(portable);
}
else
{
@@ -151,7 +152,8 @@ bool DolphinApp::OnInit()
if (PanicYesNo("Set install location to:\n %s ?", CWD))
{
FILE* workingDirF = fopen(tmp, "w");
- if (!workingDirF) PanicAlert("Install directory could not be saved");
+ if (!workingDirF)
+ PanicAlert("Install directory could not be saved");
else
{
fwrite(CWD, ((std::string)CWD).size()+1, 1, workingDirF);
@@ -159,16 +161,17 @@ bool DolphinApp::OnInit()
fclose(workingDirF);
}
}
- else PanicAlert("Relaunch Dolphin from the install directory and save from there");
+ else
+ PanicAlert("Relaunch Dolphin from the install directory and save from there");
}
}
else
{
char *tmpChar;
long len;
- fseek(workingDir,0,SEEK_END);
- len=ftell(workingDir);
- fseek(workingDir,0,SEEK_SET);
+ fseek(workingDir, 0, SEEK_END);
+ len = ftell(workingDir);
+ fseek(workingDir, 0, SEEK_SET);
tmpChar = new char[len];
fread(tmpChar, len, 1, workingDir);
fclose(workingDir);