InputCommon: Handle window change in Quartz.

This commit is contained in:
Jordan Woyak
2024-03-11 02:28:18 -05:00
parent 3665f7abac
commit 8583b6751a
4 changed files with 21 additions and 3 deletions

View File

@ -128,7 +128,6 @@ void ControllerInterface::RefreshDevices(RefreshReason reason)
// or removing them as we are populating them (causing missing or duplicate devices).
std::lock_guard lk_population(m_devices_population_mutex);
#if defined(CIFACE_USE_WIN32) && !defined(CIFACE_USE_OSX)
// If only the window changed, avoid removing and re-adding all devices.
// Instead only refresh devices that require the window handle.
if (reason == RefreshReason::WindowChangeOnly)
@ -140,9 +139,9 @@ void ControllerInterface::RefreshDevices(RefreshReason reason)
if (m_populating_devices_counter.fetch_sub(1) == 1)
InvokeDevicesChangedCallbacks();
return;
}
#endif
m_populating_devices_counter.fetch_add(1);