From 8d76dca30dd1969bc01a0df8b7b23319d95920d3 Mon Sep 17 00:00:00 2001 From: Jules Blok Date: Sun, 15 Jun 2014 13:13:37 +0200 Subject: [PATCH] Frame: Make RendererHasFocus() compatible with the new window structure. --- Source/Core/DolphinWX/Frame.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 94698837dc..763909e26b 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -722,7 +722,11 @@ bool CFrame::RendererHasFocus() if (m_RenderParent == nullptr) return false; #ifdef _WIN32 - if (m_RenderParent->GetParent()->GetHWND() == GetForegroundWindow()) + HWND window = GetForegroundWindow(); + if (window == nullptr) + return false; + + if (m_RenderFrame->GetHWND() == window) return true; #else wxWindow *window = wxWindow::FindFocus();