When checking to see if the rendering window has focus, there are a
few different variations that can be true depending on circumstances. This would likely cover the _WIN32 case as well, but since I don't pretend to fully understand just what is going on with wxWidgets here, I can't really call this any less of a hack.. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5794 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
a53d0cb6d5
commit
2be444965a
|
@ -740,16 +740,19 @@ void CFrame::OnSizeRequest(int& x, int& y, int& width, int& height)
|
||||||
|
|
||||||
bool CFrame::RendererHasFocus()
|
bool CFrame::RendererHasFocus()
|
||||||
{
|
{
|
||||||
|
if (m_RenderParent == NULL || wxWindow::FindFocus() == NULL)
|
||||||
|
return false;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
// Why doesn't the "else" method below work in windows when called from
|
|
||||||
// Host_RendererHasFocus()?
|
|
||||||
if (m_RenderParent)
|
|
||||||
if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
|
if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow())
|
||||||
return true;
|
return true;
|
||||||
return false;
|
|
||||||
#else
|
#else
|
||||||
return m_RenderParent && (m_RenderParent == wxWindow::FindFocus());
|
// Why these different cases?
|
||||||
|
if (m_RenderParent == wxWindow::FindFocus() ||
|
||||||
|
m_RenderParent == wxWindow::FindFocus()->GetParent() ||
|
||||||
|
m_RenderParent->GetParent() == wxWindow::FindFocus()->GetParent())
|
||||||
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
void CFrame::OnGameListCtrl_ItemActivated(wxListEvent& WXUNUSED (event))
|
||||||
|
|
|
@ -411,9 +411,6 @@ unsigned int Wiimote_UnPairWiimotes()
|
||||||
|
|
||||||
bool IsFocus()
|
bool IsFocus()
|
||||||
{
|
{
|
||||||
#if defined(__APPLE__) && defined(USE_WX) && USE_WX
|
|
||||||
return true; /* XXX */
|
|
||||||
#endif
|
|
||||||
return g_WiimoteInitialize.pRendererHasFocus();
|
return g_WiimoteInitialize.pRendererHasFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue