diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-05-14 16:05:42 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-05-14 16:05:42 +0200 |
commit | 24875f34d0e0b21bc6ebd3ec2e184463d28d1522 (patch) | |
tree | 821cf46dd7aabd6af830462a36fac0e3ed062c5c /src/skel | |
parent | fixed hanging boot (diff) | |
parent | fixed hanging boot (diff) | |
download | re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.gz re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.bz2 re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.lz re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.xz re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.tar.zst re3-24875f34d0e0b21bc6ebd3ec2e184463d28d1522.zip |
Diffstat (limited to 'src/skel')
-rw-r--r-- | src/skel/glfw/glfw.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/skel/glfw/glfw.cpp b/src/skel/glfw/glfw.cpp index e74e83dd..c60c5cd9 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) |