From 17e6c16bf1caed4e2167bed5a80af23b7d006095 Mon Sep 17 00:00:00 2001 From: Soren Jorvang Date: Thu, 8 Jul 2010 17:25:20 +0000 Subject: [PATCH] When running a game from the command line, exit after emulation stops. This "run once" behavior is more in line with expectations of a command line invocation and matches what the nowx build does. Personally, this makes the main build do everything the nowx build does and more. However, if you feel that the main build still doesn't have feature parity with nowx, please say so now, so we can fix it and kill off nowx. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5855 8ced0084-cf51-0410-be5f-012b33b47a6e --- Readme.txt | 5 ++--- Source/Core/Core/Src/ConfigManager.cpp | 2 +- Source/Core/DolphinWX/Src/FrameTools.cpp | 6 ++++++ Source/Core/DolphinWX/Src/Main.cpp | 14 +++----------- 4 files changed, 12 insertions(+), 15 deletions(-) diff --git a/Readme.txt b/Readme.txt index 7530766608..d6f780bf88 100644 --- a/Readme.txt +++ b/Readme.txt @@ -23,11 +23,10 @@ System Requirements: Usage: Dolphin [-h] [-d] [-l] [-e ] [-V ] [-A ] [-P ] [-W ] -h, --help Show this help message -d, --debugger Opens the debugger - -l, --logger Opens The Logger - -e, --elf= Loads an elf file + -l, --logger Opens the logger + -e, --exec= Loads the specified file (DOL, ELF, WAD, GCM, ISO) -V, --video_plugin= Specify a video plugin -A, --audio_plugin= Specify an audio plugin - -P, --pad_plugin= Specify a pad plugin -W, --wiimote_plugin= Specify a wiimote plugin [Libraries] diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index 4b0931f356..80aadbb480 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -68,7 +68,7 @@ SConfig::~SConfig() void SConfig::SaveSettings() { - NOTICE_LOG(BOOT, "Saving Settings to %s", File::GetUserPath(F_DOLPHINCONFIG_IDX)); + NOTICE_LOG(BOOT, "Saving settings"); IniFile ini; ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX)); // load first to not kill unknown stuff diff --git a/Source/Core/DolphinWX/Src/FrameTools.cpp b/Source/Core/DolphinWX/Src/FrameTools.cpp index 0f09e06732..74fb924d41 100644 --- a/Source/Core/DolphinWX/Src/FrameTools.cpp +++ b/Source/Core/DolphinWX/Src/FrameTools.cpp @@ -903,6 +903,12 @@ void CFrame::DoStop() // Clean framerate indications from the status bar. m_pStatusBar->SetStatusText(wxT(" "), 0); + + extern bool LoadFile; + + // If an executable was specified on the command-line, exit now. + if (LoadFile) + Close(true); } } diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp index 495e937081..abf2ec3533 100644 --- a/Source/Core/DolphinWX/Src/Main.cpp +++ b/Source/Core/DolphinWX/Src/Main.cpp @@ -55,7 +55,7 @@ END_EVENT_TABLE() bool wxMsgAlert(const char*, const char*, bool, int); CFrame* main_frame = NULL; -static bool LoadFile = false; +bool LoadFile = false; static wxString FileToLoad; #ifdef WIN32 @@ -113,7 +113,7 @@ bool DolphinApp::OnInit() wxCMD_LINE_SWITCH, "d", "debugger", "Opens the debugger" }, { - wxCMD_LINE_SWITCH, "l", "logger", "Opens The Logger" + wxCMD_LINE_SWITCH, "l", "logger", "Opens the logger" }, { wxCMD_LINE_OPTION, "e", "exec", "Loads the specified file (DOL, ELF, WAD, GCM, ISO)", @@ -127,10 +127,6 @@ bool DolphinApp::OnInit() wxCMD_LINE_OPTION, "A", "audio_plugin","Specify an audio plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { - wxCMD_LINE_OPTION, "P", "pad_plugin","Specify a pad plugin", - wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL - }, { wxCMD_LINE_OPTION, "W", "wiimote_plugin","Specify a wiimote plugin", wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL @@ -151,7 +147,7 @@ bool DolphinApp::OnInit() wxCMD_LINE_SWITCH, _("d"), _("debugger"), wxT("Opens the debugger") }, { - wxCMD_LINE_SWITCH, _("l"), _("logger"), wxT("Opens The Logger") + wxCMD_LINE_SWITCH, _("l"), _("logger"), wxT("Opens the logger") }, { wxCMD_LINE_OPTION, _("e"), _("exec"), wxT("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"), @@ -165,10 +161,6 @@ bool DolphinApp::OnInit() wxCMD_LINE_OPTION, _("A"), _("audio_plugin"), wxT("Specify an audio plugin"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL }, - { - wxCMD_LINE_OPTION, _("P"), _("pad_plugin"), wxT("Specify a pad plugin"), - wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL - }, { wxCMD_LINE_OPTION, _("W"), _("wiimote_plugin"), wxT("Specify a wiimote plugin"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL