Windows input optimizations

Fixes a bug where the thread wouldn't sleep when it should in some
configurations.

Also increases the time between polls for new controllers.
This commit is contained in:
Henrik Rydgård committed 2026-03-09 11:02:04 +01:00
1 parent 593e0fd8d9
commit 82069c3503
5 files changed
+7 -8

No files matched your search

+1 -1
View File
@@ -417,7 +417,7 @@ DInputMetaDevice::DInputMetaDevice() {
}
int DInputMetaDevice::UpdateState() {
static const int CHECK_FREQUENCY = 71; // Just an arbitrary prime to try to not collide with other periodic checks.
constexpr int CHECK_FREQUENCY = 787; // Just an arbitrary prime to try to not collide with other periodic checks.
if (checkCounter_++ > CHECK_FREQUENCY) {
const size_t newCount = DinputDevice::getNumPads();
if (newCount > numDinputDevices_) {