From 61b482a88aef172b02ead18b01ba5e57a9be65f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Thu, 25 Apr 2019 17:02:02 +0200 Subject: [PATCH] Removed VIGEM_INVERTED_CALL_THREAD_COUNT macro --- src/NotificationRequestPool.h | 5 ++--- src/ViGEmClient.cpp | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/NotificationRequestPool.h b/src/NotificationRequestPool.h index 026f30a..c544cb9 100644 --- a/src/NotificationRequestPool.h +++ b/src/NotificationRequestPool.h @@ -9,12 +9,11 @@ #include "ViGEm/Client.h" #include "Internal.h" -#define VIGEM_INVERTED_CALL_THREAD_COUNT 20 - class NotificationRequestPool { - HANDLE wait_handles_[VIGEM_INVERTED_CALL_THREAD_COUNT]{}; + static const int thread_count = 20; + HANDLE wait_handles_[thread_count]{}; PVIGEM_CLIENT client_; PVIGEM_TARGET target_; diff --git a/src/ViGEmClient.cpp b/src/ViGEmClient.cpp index 8e42093..f2a37e5 100644 --- a/src/ViGEmClient.cpp +++ b/src/ViGEmClient.cpp @@ -531,7 +531,7 @@ VIGEM_ERROR vigem_target_ds4_register_notification( std::vector threadList; - for (int i = 0; i < VIGEM_INVERTED_CALL_THREAD_COUNT; i++) + for (int i = 0; i < 20 /* TODO: legacy, remove */; i++) { threadList.emplace_back(std::thread([]( PVIGEM_TARGET _Target,