Qt: fix input focus checks being wrong

When rendering to main and going full screen, we aren't using the main window handle
as the code assumed, but the other, detached, render widget.
This commit is contained in:
Filoppi 2021-06-07 14:35:59 +03:00
parent 5e371bb4be
commit 7c83b745c5

View file

@ -88,7 +88,7 @@ bool Host::GetRenderFocus()
#ifdef _WIN32
// Unfortunately Qt calls SetRenderFocus() with a slight delay compared to what we actually need
// to avoid inputs that cause a focus loss to be processed by the emulation
if (m_render_to_main)
if (m_render_to_main && !m_render_fullscreen)
return GetForegroundWindow() == (HWND)m_main_window_handle.load();
return GetForegroundWindow() == (HWND)m_render_handle.load();
#else