summaryrefslogtreecommitdiffstats
path: root/src/skel
diff options
context:
space:
mode:
authorerorcun <erorcunerorcun@hotmail.com.tr>2021-02-05 15:51:57 +0100
committererorcun <erorcunerorcun@hotmail.com.tr>2021-02-05 16:23:50 +0100
commitc7ba01b034ab67b1343bc728bd058c47eb48efc4 (patch)
tree130781cee8e0b7f8f00162dfb2e895211d4e097f /src/skel
parentMP3 player fixes (diff)
downloadre3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.gz
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.bz2
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.lz
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.xz
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.tar.zst
re3-c7ba01b034ab67b1343bc728bd058c47eb48efc4.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 8c4fb14c..e5f4c7ba 100644
--- a/src/skel/crossplatform.h
+++ b/src/skel/crossplatform.h
@@ -71,7 +71,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 9643c63b..b413a1ce 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -81,7 +81,7 @@ static psGlobalType PsGlobal;
size_t _dwMemAvailPhys;
RwUInt32 gGameState;
-#ifdef DONT_TRUST_RECOGNIZED_JOYSTICKS
+#ifdef DETECT_JOYSTICK_MENU
char gSelectedJoystickName[128] = "";
#endif
@@ -841,7 +841,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))
@@ -906,7 +906,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);
@@ -2150,7 +2150,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 3bda4e9d..c00d6075 100644
--- a/src/skel/win/win.cpp
+++ b/src/skel/win/win.cpp
@@ -121,6 +121,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;