From 22cf645664bf363f943a32c5139208448a707a59 Mon Sep 17 00:00:00 2001 From: Ilyaki Date: Sat, 21 Aug 2021 11:50:16 +0100 Subject: [PATCH] Fixed Xinput hooks (oops!) --- src/ProtoInput/ProtoInputHooks/XinputHook.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ProtoInput/ProtoInputHooks/XinputHook.cpp b/src/ProtoInput/ProtoInputHooks/XinputHook.cpp index b9831f7..7bef8c4 100644 --- a/src/ProtoInput/ProtoInputHooks/XinputHook.cpp +++ b/src/ProtoInput/ProtoInputHooks/XinputHook.cpp @@ -48,16 +48,16 @@ inline std::pair GetTargetControllerIndex(DWORD dwUserIndex) { // XinputHook::controllerIndex 0 means user wants no controller on this game if (dwUserIndex == 0 || dwUserIndex == XUSER_INDEX_ANY) - return { XinputHook::controllerIndex == 0, XinputHook::controllerIndex - 1 }; + return { XinputHook::controllerIndex != 0, XinputHook::controllerIndex - 1 }; if (dwUserIndex == 1) - return { XinputHook::controllerIndex2 == 0, XinputHook::controllerIndex2 - 1 }; + return { XinputHook::controllerIndex2 != 0, XinputHook::controllerIndex2 - 1 }; if (dwUserIndex == 2) - return { XinputHook::controllerIndex3 == 0, XinputHook::controllerIndex3 - 1 }; + return { XinputHook::controllerIndex3 != 0, XinputHook::controllerIndex3 - 1 }; if (dwUserIndex == 3) - return { XinputHook::controllerIndex4 == 0, XinputHook::controllerIndex4 - 1 }; + return { XinputHook::controllerIndex4 != 0, XinputHook::controllerIndex4 - 1 }; return { false, 0 }; }