mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Fix a segfault when the debugger is used and dolphin exits.
Put the filename back into the "Saving settings ..." notice log (soren don't remove this again.) Added a "batch" mode command line option. Now dolphin will not exit with the emulator if a file is run from the command line unless you also use the "batch" option. For example in linux "dolphin-emu -b -e filename". git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5859 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -55,8 +55,6 @@ END_EVENT_TABLE()
|
||||
bool wxMsgAlert(const char*, const char*, bool, int);
|
||||
|
||||
CFrame* main_frame = NULL;
|
||||
bool LoadFile = false;
|
||||
static wxString FileToLoad;
|
||||
|
||||
#ifdef WIN32
|
||||
//Has no error handling.
|
||||
@ -92,6 +90,7 @@ bool DolphinApp::OnInit()
|
||||
{
|
||||
// Declarations and definitions
|
||||
bool UseDebugger = false;
|
||||
bool BatchMode = false;
|
||||
bool UseLogger = false;
|
||||
bool selectVideoPlugin = false;
|
||||
bool selectAudioPlugin = false;
|
||||
@ -119,6 +118,9 @@ bool DolphinApp::OnInit()
|
||||
wxCMD_LINE_OPTION, "e", "exec", "Loads the specified file (DOL, ELF, WAD, GCM, ISO)",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_SWITCH, "b", "batch", "Exit Dolphin with emulator"
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, "V", "video_plugin","Specify a video plugin",
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
@ -153,6 +155,9 @@ bool DolphinApp::OnInit()
|
||||
wxCMD_LINE_OPTION, _("e"), _("exec"), wxT("Loads the specified file (DOL, ELF, WAD, GCM, ISO)"),
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_SWITCH, _("b"), _("batch"), wxT("Exit Dolphin with emulator")
|
||||
},
|
||||
{
|
||||
wxCMD_LINE_OPTION, _("V"), _("video_plugin"), wxT("Specify a video plugin"),
|
||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL
|
||||
@ -181,10 +186,12 @@ bool DolphinApp::OnInit()
|
||||
UseDebugger = parser.Found("debugger");
|
||||
UseLogger = parser.Found("logger");
|
||||
LoadFile = parser.Found("exec", &FileToLoad);
|
||||
BatchMode = parser.Found("batch");
|
||||
#else
|
||||
UseDebugger = parser.Found(wxT("debugger"));
|
||||
UseLogger = parser.Found(wxT("logger"));
|
||||
LoadFile = parser.Found(wxT("exec"), &FileToLoad);
|
||||
BatchMode = parser.Found(wxT("batch"));
|
||||
#endif
|
||||
|
||||
#if wxCHECK_VERSION(2, 9, 0)
|
||||
@ -368,7 +375,7 @@ bool DolphinApp::OnInit()
|
||||
main_frame = new CFrame((wxFrame*)NULL, wxID_ANY,
|
||||
wxString::FromAscii(svn_rev_str),
|
||||
wxPoint(x, y), wxSize(w, h),
|
||||
UseDebugger, UseLogger);
|
||||
UseDebugger, BatchMode, UseLogger);
|
||||
SetTopWindow(main_frame);
|
||||
|
||||
#if defined HAVE_X11 && HAVE_X11
|
||||
|
Reference in New Issue
Block a user