Host: Also call ControllerInterface::ChangeWindow when window changes

This should prevent us from trying to poll against destroyed native
windows.
This commit is contained in:
Stenzek 2018-10-27 21:22:55 +10:00
parent cb6ba59a44
commit 6392be61eb
1 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,8 @@
#include "DolphinQt/QtUtils/QueueOnObject.h" #include "DolphinQt/QtUtils/QueueOnObject.h"
#include "DolphinQt/Settings.h" #include "DolphinQt/Settings.h"
#include "InputCommon/ControllerInterface/ControllerInterface.h"
#include "VideoCommon/RenderBase.h" #include "VideoCommon/RenderBase.h"
#include "VideoCommon/VideoConfig.h" #include "VideoCommon/VideoConfig.h"
@ -37,7 +39,11 @@ void Host::SetRenderHandle(void* handle)
m_render_handle = handle; m_render_handle = handle;
if (g_renderer) if (g_renderer)
{
g_renderer->ChangeSurface(handle); g_renderer->ChangeSurface(handle);
if (g_controller_interface.IsInit())
g_controller_interface.ChangeWindow(handle);
}
} }
bool Host::GetRenderFocus() bool Host::GetRenderFocus()