From 6392be61ebf00188cd048b42c99fff60f0a56139 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 27 Oct 2018 21:22:55 +1000 Subject: [PATCH] Host: Also call ControllerInterface::ChangeWindow when window changes This should prevent us from trying to poll against destroyed native windows. --- Source/Core/DolphinQt/Host.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index 5e73896d7a..c4d3711eda 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -19,6 +19,8 @@ #include "DolphinQt/QtUtils/QueueOnObject.h" #include "DolphinQt/Settings.h" +#include "InputCommon/ControllerInterface/ControllerInterface.h" + #include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoConfig.h" @@ -37,7 +39,11 @@ void Host::SetRenderHandle(void* handle) m_render_handle = handle; if (g_renderer) + { g_renderer->ChangeSurface(handle); + if (g_controller_interface.IsInit()) + g_controller_interface.ChangeWindow(handle); + } } bool Host::GetRenderFocus()