From 675aef29cf85f956052a150792d4d56f91ff692c Mon Sep 17 00:00:00 2001 From: erorcun Date: Fri, 5 Feb 2021 17:51:57 +0300 Subject: Detect joystick menu for XInput --- src/skel/glfw/glfw.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/skel/glfw/glfw.cpp') diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index 97a77827..8fe1d93f 100644 --- a/src/skel/glfw/glfw.cpp +++ b/src/skel/glfw/glfw.cpp @@ -80,7 +80,7 @@ static psGlobalType PsGlobal; size_t _dwMemAvailPhys; RwUInt32 gGameState; -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU char gSelectedJoystickName[128] = ""; #endif @@ -852,7 +852,7 @@ void joysChangeCB(int jid, int event); bool IsThisJoystickBlacklisted(int i) { -#ifndef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifndef DETECT_JOYSTICK_MENU return false; #else if (glfwJoystickIsGamepad(i)) @@ -917,7 +917,7 @@ void _InputInitialiseJoys() if (PSGLOBAL(joy1id) != -1) { int count; glfwGetJoystickButtons(PSGLOBAL(joy1id), &count); -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU strcpy(gSelectedJoystickName, glfwGetJoystickName(PSGLOBAL(joy1id))); #endif ControlsManager.InitDefaultControlConfigJoyPad(count); @@ -2182,7 +2182,7 @@ void joysChangeCB(int jid, int event) if (event == GLFW_CONNECTED && !IsThisJoystickBlacklisted(jid)) { if (PSGLOBAL(joy1id) == -1) { PSGLOBAL(joy1id) = jid; -#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS +#ifdef DETECT_JOYSTICK_MENU strcpy(gSelectedJoystickName, glfwGetJoystickName(jid)); #endif // This is behind LOAD_INI_SETTINGS, because otherwise the Init call below will destroy/overwrite your bindings. -- cgit v1.2.3