mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Allow opening a file and starting Dolphin on OS X by clicking
a document icon. Don't bother creating the game list until after an automatic start has finished and with the -b option, not at all. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6884 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -327,29 +327,34 @@ bool DolphinApp::OnInit()
|
||||
XInitThreads();
|
||||
#endif
|
||||
|
||||
// Postpone final actions until event handler is running
|
||||
// Postpone final actions until event handler is running.
|
||||
// Updating the game list makes use of wxProgressDialog which may
|
||||
// only be run after OnInit() when the event handler is running.
|
||||
m_afterinit = new wxTimer(this, wxID_ANY);
|
||||
m_afterinit->Start(1, wxTIMER_ONE_SHOT);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void DolphinApp::MacOpenFile(const wxString &fileName)
|
||||
{
|
||||
FileToLoad = fileName;
|
||||
LoadFile = true;
|
||||
|
||||
if (m_afterinit == NULL)
|
||||
main_frame->BootGame(std::string(FileToLoad.mb_str()));
|
||||
}
|
||||
|
||||
void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||
{
|
||||
delete m_afterinit;
|
||||
|
||||
// Updating the game list makes use of wxProgressDialog which may
|
||||
// only be run after OnInit() when the event handler is running.
|
||||
main_frame->UpdateGameList();
|
||||
|
||||
// Check the autoboot options:
|
||||
m_afterinit = NULL;
|
||||
|
||||
// First check if we have an exec command line.
|
||||
if (LoadFile && FileToLoad != wxEmptyString)
|
||||
{
|
||||
main_frame->BootGame(std::string(FileToLoad.mb_str()));
|
||||
}
|
||||
|
||||
// If we have selected Automatic Start, start the default ISO,
|
||||
// or if no default ISO exists, start the last loaded ISO
|
||||
else if (main_frame->g_pCodeWindow)
|
||||
@ -370,6 +375,9 @@ void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||
}
|
||||
}
|
||||
}
|
||||
// No automatic start was requested; let the user make a selection.
|
||||
else
|
||||
main_frame->UpdateGameList();
|
||||
}
|
||||
|
||||
void DolphinApp::InitLanguageSupport()
|
||||
|
Reference in New Issue
Block a user