Misc: Backports from PCSX2 UI

This commit is contained in:
Connor McLaughlin
2022-10-23 14:09:54 +10:00
parent 8438506206
commit 72dfbaf6cc
37 changed files with 1037 additions and 271 deletions

View File

@ -478,6 +478,11 @@ void NoGUIHost::PlatformWindowFocusLost()
});
}
void NoGUIHost::PlatformDevicesChanged()
{
Host::RunOnCPUThread([]() { InputManager::ReloadDevices(); });
}
bool NoGUIHost::GetSavedPlatformWindowGeometry(s32* x, s32* y, s32* width, s32* height)
{
auto lock = Host::GetSettingsLock();
@ -687,6 +692,11 @@ bool NoGUIHost::AcquireHostDisplay(RenderAPI api)
return false;
}
// reload input sources, since it might use the window handle
{
auto lock = Host::GetSettingsLock();
InputManager::ReloadSources(*Host::GetSettingsInterface(), lock);
}
return true;
}
@ -708,6 +718,9 @@ void NoGUIHost::ReleaseHostDisplay()
if (!g_host_display)
return;
// close input sources, since it might use the window handle
InputManager::CloseSources();
CommonHost::ReleaseHostDisplayResources();
ImGuiManager::Shutdown();
g_host_display.reset();