mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Wiimote: Don't allow input when Dolphin is not in focus (supports both the rendering to main window and render to separate window options)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2057 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -336,6 +336,18 @@ extern "C" unsigned int Wiimote_GetAttachedControllers()
|
||||
// Supporting functions
|
||||
//******************************************************************************
|
||||
|
||||
// Check if Dolphin is in focus
|
||||
bool IsFocus()
|
||||
{
|
||||
HWND Parent = GetParent(g_WiimoteInitialize.hWnd);
|
||||
HWND TopLevel = GetParent(Parent);
|
||||
// Support both rendering to main window and not
|
||||
if (GetForegroundWindow() == TopLevel || GetForegroundWindow() == g_WiimoteInitialize.hWnd)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void ReadDebugging(bool Emu, const void* _pData)
|
||||
{
|
||||
//
|
||||
|
Reference in New Issue
Block a user