Merge pull request #2992 from aserna3/master

Implemented CLI switch to disable confirm on stop
This commit is contained in:
Lioncash 2015-09-06 16:55:11 -04:00
commit 1b026364bf
2 changed files with 10 additions and 0 deletions

View File

@ -188,6 +188,11 @@ void DolphinApp::OnInitCmdLine(wxCmdLineParser& parser)
"Exit Dolphin with emulator",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_SWITCH, "n", "noconfirm",
"Disable Confirm on Stop",
wxCMD_LINE_VAL_NONE, wxCMD_LINE_PARAM_OPTIONAL
},
{
wxCMD_LINE_OPTION, "v", "video_backend",
"Specify a video backend",
@ -234,6 +239,7 @@ bool DolphinApp::OnCmdLineParsed(wxCmdLineParser& parser)
m_use_debugger = parser.Found("debugger");
m_use_logger = parser.Found("logger");
m_batch_mode = parser.Found("batch");
m_no_confirm_stop = parser.Found("noconfirm");
m_select_video_backend = parser.Found("video_backend", &m_video_backend_name);
m_select_audio_emulation = parser.Found("audio_emulation", &m_audio_emulation_name);
m_play_movie = parser.Found("movie", &m_movie_file);
@ -273,6 +279,9 @@ void DolphinApp::AfterInit()
if (!m_batch_mode)
main_frame->UpdateGameList();
if (m_no_confirm_stop)
SConfig::GetInstance().bConfirmStop = false;
if (m_play_movie && !m_movie_file.empty())
{
if (Movie::PlayInput(WxStrToStr(m_movie_file)))

View File

@ -36,6 +36,7 @@ private:
static bool DolphinEmulatorDotComTextFileExists();
bool m_batch_mode = false;
bool m_no_confirm_stop = false;
bool m_load_file = false;
bool m_play_movie = false;
bool m_use_debugger = false;