Reinstate AfterInit(), which is still needed for MacOpenFile()
to work properly and possibly also wxProgressDialog. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7355 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5027554beb
commit
da82d7e178
|
@ -425,7 +425,6 @@ cUIDsys::cUIDsys()
|
||||||
|
|
||||||
if (m_Elements.empty())
|
if (m_Elements.empty())
|
||||||
{
|
{
|
||||||
SElement Element;
|
|
||||||
*(u64*)&(Element.titleID) = Common::swap64(TITLEID_SYSMENU);
|
*(u64*)&(Element.titleID) = Common::swap64(TITLEID_SYSMENU);
|
||||||
*(u32*)&(Element.UID) = Common::swap32(lastUID++);
|
*(u32*)&(Element.UID) = Common::swap32(lastUID++);
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,10 @@
|
||||||
|
|
||||||
IMPLEMENT_APP(DolphinApp)
|
IMPLEMENT_APP(DolphinApp)
|
||||||
|
|
||||||
|
BEGIN_EVENT_TABLE(DolphinApp, wxApp)
|
||||||
|
EVT_TIMER(wxID_ANY, DolphinApp::AfterInit)
|
||||||
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
#include <wx/stdpaths.h>
|
#include <wx/stdpaths.h>
|
||||||
bool wxMsgAlert(const char*, const char*, bool, int);
|
bool wxMsgAlert(const char*, const char*, bool, int);
|
||||||
std::string wxStringTranslator(const char *);
|
std::string wxStringTranslator(const char *);
|
||||||
|
@ -321,6 +325,12 @@ bool DolphinApp::OnInit()
|
||||||
SetTopWindow(main_frame);
|
SetTopWindow(main_frame);
|
||||||
main_frame->SetMinSize(wxSize(400, 300));
|
main_frame->SetMinSize(wxSize(400, 300));
|
||||||
|
|
||||||
|
// 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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -329,12 +339,15 @@ void DolphinApp::MacOpenFile(const wxString &fileName)
|
||||||
FileToLoad = fileName;
|
FileToLoad = fileName;
|
||||||
LoadFile = true;
|
LoadFile = true;
|
||||||
|
|
||||||
if (IsMainLoopRunning())
|
if (m_afterinit == NULL)
|
||||||
main_frame->BootGame(std::string(FileToLoad.mb_str()));
|
main_frame->BootGame(std::string(FileToLoad.mb_str()));
|
||||||
}
|
}
|
||||||
|
|
||||||
int DolphinApp::MainLoop()
|
void DolphinApp::AfterInit(wxTimerEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
|
delete m_afterinit;
|
||||||
|
m_afterinit = NULL;
|
||||||
|
|
||||||
if (!BatchMode)
|
if (!BatchMode)
|
||||||
main_frame->UpdateGameList();
|
main_frame->UpdateGameList();
|
||||||
|
|
||||||
|
@ -362,8 +375,6 @@ int DolphinApp::MainLoop()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxApp::MainLoop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DolphinApp::InitLanguageSupport()
|
void DolphinApp::InitLanguageSupport()
|
||||||
|
|
|
@ -35,12 +35,15 @@ private:
|
||||||
void InitLanguageSupport();
|
void InitLanguageSupport();
|
||||||
void MacOpenFile(const wxString &fileName);
|
void MacOpenFile(const wxString &fileName);
|
||||||
|
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
|
||||||
|
wxTimer *m_afterinit;
|
||||||
bool BatchMode;
|
bool BatchMode;
|
||||||
bool LoadFile;
|
bool LoadFile;
|
||||||
wxString FileToLoad;
|
wxString FileToLoad;
|
||||||
wxLocale *m_locale;
|
wxLocale *m_locale;
|
||||||
|
|
||||||
int MainLoop();
|
void AfterInit(wxTimerEvent& WXUNUSED(event));
|
||||||
};
|
};
|
||||||
|
|
||||||
DECLARE_APP(DolphinApp);
|
DECLARE_APP(DolphinApp);
|
||||||
|
|
Loading…
Reference in New Issue