diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 37311c84bf..179c69b5f0 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -162,6 +162,11 @@ bool DolphinApp::OnInit() "Low level (LLE) or high level (HLE) audio", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, + { + wxCMD_LINE_OPTION, "m", "movie", + "Play a movie file", + wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL + }, { wxCMD_LINE_NONE, NULL, NULL, NULL, wxCMD_LINE_VAL_NONE, 0 } @@ -182,6 +187,7 @@ bool DolphinApp::OnInit() &videoBackendName); selectAudioEmulation = parser.Found(wxT("audio_emulation"), &audioEmulationName); + playMovie = parser.Found(wxT("movie"), &movieFile); #endif // wxUSE_CMDLINE_PARSER #if defined _DEBUG && defined _WIN32 @@ -331,8 +337,21 @@ void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event)) if (!BatchMode) main_frame->UpdateGameList(); + if (playMovie && movieFile != wxEmptyString) + { + if (Movie::PlayInput(movieFile.char_str())) + { + if (LoadFile && FileToLoad != wxEmptyString) + { + main_frame->BootGame(WxStrToStr(FileToLoad)); + } + else + main_frame->BootGame(std::string("")); + } + } + // First check if we have an exec command line. - if (LoadFile && FileToLoad != wxEmptyString) + else if (LoadFile && FileToLoad != wxEmptyString) { main_frame->BootGame(WxStrToStr(FileToLoad)); } @@ -342,17 +361,7 @@ void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event)) { if (main_frame->g_pCodeWindow->AutomaticStart()) { - if(!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM.empty() - && File::Exists(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM)) - { - main_frame->BootGame(SConfig::GetInstance().m_LocalCoreStartupParameter. - m_strDefaultGCM); - } - else if(!SConfig::GetInstance().m_LastFilename.empty() - && File::Exists(SConfig::GetInstance().m_LastFilename)) - { - main_frame->BootGame(SConfig::GetInstance().m_LastFilename); - } + main_frame->BootGame(""); } } } diff --git a/Source/Core/DolphinWX/Src/Main.h b/Source/Core/DolphinWX/Src/Main.h index 0fb99fcfd4..d043a6c24e 100644 --- a/Source/Core/DolphinWX/Src/Main.h +++ b/Source/Core/DolphinWX/Src/Main.h @@ -40,7 +40,9 @@ private: wxTimer *m_afterinit; bool BatchMode; bool LoadFile; + bool playMovie; wxString FileToLoad; + wxString movieFile; wxLocale *m_locale; void AfterInit(wxTimerEvent& WXUNUSED(event));