mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-09 23:39:45 -06:00
Remove HaveFocus, and put that code into IsFocus. Thanks ayuanx.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5058 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -598,17 +598,6 @@ void UpdatePadState(CONTROLLER_MAPPING_GC &_GCiMapping)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
bool HaveFocus (void)
|
||||
{
|
||||
Window GLWin = *(Window *)g_PADInitialize->pXWindow;
|
||||
Window FocusWin;
|
||||
int Revert;
|
||||
XGetInputFocus(GCdisplay, &FocusWin, &Revert);
|
||||
return (GLWin != 0 && GLWin == FocusWin);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Multi System Input Status Check
|
||||
bool IsKey(int Key)
|
||||
{
|
||||
@ -622,7 +611,7 @@ bool IsKey(int Key)
|
||||
}
|
||||
else if (MapKey < 0x1100)
|
||||
#elif defined HAVE_X11 && HAVE_X11
|
||||
if (HaveFocus() && (MapKey < 256 || MapKey > 0xf000))
|
||||
if (MapKey < 256 || MapKey > 0xf000)
|
||||
{
|
||||
char keys[32];
|
||||
KeyCode keyCode;
|
||||
@ -663,7 +652,13 @@ bool IsFocus()
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
#else
|
||||
#elif defined HAVE_X11 && HAVE_X11
|
||||
Window GLWin = *(Window *)g_PADInitialize->pXWindow;
|
||||
Window FocusWin;
|
||||
int Revert;
|
||||
XGetInputFocus(GCdisplay, &FocusWin, &Revert);
|
||||
return (GLWin != 0 && GLWin == FocusWin);
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user