summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-10 08:01:53 +0100
committerSergeanur <s.anureev@yandex.ua>2021-02-10 08:01:53 +0100
commitb6af7393e8494570de4bfa837ba2090c522b28bb (patch)
treeaba068f1307a1a4e8c3d72adf69c0869f5c29f0e /src/skel
parentController menu (diff)
parentfix clouds (diff)
downloadre3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar.gz
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar.bz2
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar.lz
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar.xz
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.tar.zst
re3-b6af7393e8494570de4bfa837ba2090c522b28bb.zip
Diffstat (limited to 'src/skel')
-rw-r--r--src/skel/crossplatform.h2
-rw-r--r--src/skel/glfw/glfw.cpp8
-rw-r--r--src/skel/win/win.cpp4
3 files changed, 9 insertions, 5 deletions
diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h
index 009b17c7..6ea5b11e 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -75,7 +75,7 @@ void CapturePad(RwInt32 padID);
void joysChangeCB(int jid, int event);
#endif
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
extern char gSelectedJoystickName[128];
#endif
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.
diff --git a/src/skel/win/win.cpp b/src/skel/win/win.cpp
index 397e88c4..6ed02011 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -120,6 +120,10 @@ DWORD _dwOperatingSystemVersion;
RwUInt32 gGameState;
CJoySticks AllValidWinJoys;
+#ifdef DETECT_JOYSTICK_MENU
+char gSelectedJoystickName[128] = "";
+#endif
+
// What is that for anyway?
#ifndef IMPROVED_VIDEOMODE
static RwBool defaultFullscreenRes = TRUE;