summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-14 00:09:45 +0200
committeraap <aap@papnet.eu>2020-05-14 00:09:45 +0200
commitf5345f59eaf35cd701837ae80730495531793cfd (patch)
tree828d2075eefff2eef4444242021efe44d651b1e5 /src
parentFix calloc in CdStreamPosix (diff)
downloadre3-f5345f59eaf35cd701837ae80730495531793cfd.tar
re3-f5345f59eaf35cd701837ae80730495531793cfd.tar.gz
re3-f5345f59eaf35cd701837ae80730495531793cfd.tar.bz2
re3-f5345f59eaf35cd701837ae80730495531793cfd.tar.lz
re3-f5345f59eaf35cd701837ae80730495531793cfd.tar.xz
re3-f5345f59eaf35cd701837ae80730495531793cfd.tar.zst
re3-f5345f59eaf35cd701837ae80730495531793cfd.zip
Diffstat (limited to 'src')
-rw-r--r--src/skel/glfw/glfw.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp
index f0a704a8..fc23e900 100644
--- a/src/skel/glfw/glfw.cpp
+++ b/src/skel/glfw/glfw.cpp
@@ -715,10 +715,23 @@ void scrollCB(GLFWwindow* window, double xoffset, double yoffset);
void cursorCB(GLFWwindow* window, double xpos, double ypos);
void joysChangeCB(int jid, int event);
+bool IsThisJoystickBlacklisted(int i)
+{
+ const char *joyname = glfwGetJoystickName(i);
+
+ // this is just a keyboard and mouse
+ // Microsoft Microsoft® 2.4GHz Transceiver v8.0 Consumer Control
+ // Microsoft Microsoft® 2.4GHz Transceiver v8.0 System Control
+ if(strstr(joyname, "2.4GHz Transceiver"))
+ return true;
+
+ return false;
+}
+
void _InputInitialiseJoys()
{
for (int i = 0; i <= GLFW_JOYSTICK_LAST; i++) {
- if (glfwJoystickPresent(i)) {
+ if (glfwJoystickPresent(i) && !IsThisJoystickBlacklisted(i)) {
if (PSGLOBAL(joy1id) == -1)
PSGLOBAL(joy1id) = i;
else if (PSGLOBAL(joy2id) == -1)