Move user directory detection location to UICommon.

The UI should decide on where it wants the user directory, not our core system.
This is in anticipation of some upcoming work on Android which will need proper user directory setting.
This commit is contained in:
Ryan Houdek
2015-02-25 03:23:42 -06:00
parent 792e166f87
commit db06f058e4
8 changed files with 98 additions and 68 deletions

View File

@ -229,12 +229,7 @@ bool DolphinApp::OnInit()
selectAudioEmulation = parser.Found("audio_emulation", &audioEmulationName);
selectPerfDir = parser.Found("perf_dir", &perfDir);
playMovie = parser.Found("movie", &movieFile);
if (parser.Found("user", &userPath))
{
File::CreateFullPath(WxStrToStr(userPath) + DIR_SEP);
File::GetUserPath(D_USER_IDX, userPath.ToStdString() + DIR_SEP);
}
parser.Found("user", &userPath);
#endif // wxUSE_CMDLINE_PARSER
// Register message box and translation handlers
@ -249,6 +244,7 @@ bool DolphinApp::OnInit()
wxHandleFatalExceptions(true);
#endif
UICommon::SetUserDirectory(userPath.ToStdString());
UICommon::CreateDirectories();
UICommon::Init();
@ -421,7 +417,6 @@ void DolphinApp::OnFatalException()
WiimoteReal::Shutdown();
}
// ------------
// Talk to GUI