]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Automatically enable joystick support
authorLockl00p <97256723+Lockl00p@users.noreply.github.com>
Fri, 24 May 2024 01:01:48 +0000 (20:01 -0500)
committerLockl00p <97256723+Lockl00p@users.noreply.github.com>
Fri, 24 May 2024 01:01:48 +0000 (20:01 -0500)
Or else, you'd need an autoexec file for first time setup.

vid_shared.c

index ba0ab58ccad59c3438c813653cad982fdf97669b..a974afca604034064ac73629689e4cfccaf0acf7 100644 (file)
@@ -83,7 +83,11 @@ cvar_t joy_xinputavailable = {CF_CLIENT | CF_READONLY, "joy_xinputavailable", "0
 #endif
 cvar_t joy_active = {CF_CLIENT | CF_READONLY, "joy_active", "0", "indicates that a joystick is active (detected and enabled)"};
 cvar_t joy_detected = {CF_CLIENT | CF_READONLY, "joy_detected", "0", "number of joysticks detected by engine"};
+#ifdef __SWITCH__
+cvar_t joy_enable = {CF_CLIENT | CF_ARCHIVE, "joy_enable", "1", "enables joystick support"};
+#else
 cvar_t joy_enable = {CF_CLIENT | CF_ARCHIVE, "joy_enable", "0", "enables joystick support"};
+#endif
 cvar_t joy_index = {CF_CLIENT, "joy_index", "0", "selects which joystick to use if you have multiple (0 uses the first controller, 1 uses the second, ...)"};
 cvar_t joy_axisforward = {CF_CLIENT, "joy_axisforward", "1", "which joystick axis to query for forward/backward movement"};
 cvar_t joy_axisside = {CF_CLIENT, "joy_axisside", "0", "which joystick axis to query for right/left movement"};