mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 04:08:55 +00:00
Move UiHasFocus into DolphinApp
Using a wxEVT_ACTIVATE_APP event.
This commit is contained in:
parent
2005b4430f
commit
ee201455a8
4 changed files with 13 additions and 19 deletions
|
@ -84,6 +84,7 @@ bool DolphinApp::OnInit()
|
|||
Bind(wxEVT_QUERY_END_SESSION, &DolphinApp::OnEndSession, this);
|
||||
Bind(wxEVT_END_SESSION, &DolphinApp::OnEndSession, this);
|
||||
Bind(wxEVT_IDLE, &DolphinApp::OnIdle, this);
|
||||
Bind(wxEVT_ACTIVATE_APP, &DolphinApp::OnActivate, this);
|
||||
|
||||
// Register message box and translation handlers
|
||||
RegisterMsgAlertHandler(&wxMsgAlert);
|
||||
|
@ -256,6 +257,11 @@ void DolphinApp::AfterInit()
|
|||
}
|
||||
}
|
||||
|
||||
void DolphinApp::OnActivate(wxActivateEvent& ev)
|
||||
{
|
||||
m_is_active = ev.GetActive();
|
||||
}
|
||||
|
||||
void DolphinApp::InitLanguageSupport()
|
||||
{
|
||||
std::string language_code;
|
||||
|
@ -500,7 +506,7 @@ void Host_SetWiiMoteConnectionState(int _State)
|
|||
|
||||
bool Host_UIHasFocus()
|
||||
{
|
||||
return main_frame->UIHasFocus();
|
||||
return wxGetApp().IsActiveThreadsafe();
|
||||
}
|
||||
|
||||
bool Host_RendererHasFocus()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue