Commit graph

4710 commits

Author SHA1 Message Date
wolfy852
f2e5de3043 Check joystick IDs against all other players [by Digiku]
Untested on my end, but conceptually sound.
2018-12-29 02:33:53 -06:00
wolfy852
650df71cfc Reorganize some of the code for SDL_JOYDEVICEADDED events 2018-12-28 14:20:28 -06:00
wolfy852
4dc7c6459c Disable DEVELOP, since this is ready to merge 2018-12-27 21:23:32 -06:00
wolfy852
b5b9703b8b Make I_GetJoystickDeviceIndex account for controllers 3 and 4 2018-12-27 18:28:09 -06:00
wolfy852
6fc90ada95 Fix an issue where gamepad options for player 4 ended up binding settings for player 3 instead. 2018-12-27 18:13:13 -06:00
wolfy852
f4d6a108d5 Merge remote-tracking branch 'remotes/SRB2/vanilla-hotplug-stableid' into gamepad-tweaks
# Conflicts:
#	src/command.c
#	src/command.h
#	src/g_game.c
#	src/m_menu.c
#	src/sdl/i_system.c
#	src/sdl/i_video.c
#	src/sdl/sdlmain.h

This is NOT just a normal merge commit. I have adjusted the hotplugging code from stableid to account for the last two players, and also removed new 2.1 additions that were deemed irrelevant to Kart.
2018-12-27 16:21:51 -06:00
wolfy852
0bd646d381 Kill default d-pad bindings aside from "Show Rankings" 2018-12-24 21:30:42 -06:00
wolfy852
72619a3f71 Extend joystick hotplugging to players 3 and 4 2018-12-19 18:08:38 -06:00
wolfy852
39e01fe643 Revert GameController stuff 2018-12-19 13:11:30 -06:00
wolfy852
586c60a00d I_NumGameControllers, print GameController mapping, and store joystick GUID in JoyInfo 2018-12-14 12:49:07 -06:00
wolfy852
ac62575896 Print GameController info when detected, use proper 360 controller defaults for triggers 2018-12-14 11:50:53 -06:00
mazmazz
f90348ac05 Better I_InitJoystick log message 2018-12-14 06:14:21 -05:00
mazmazz
1d2512e4c0 Allow use_joystick/2 to be saved once again 2018-12-14 06:07:20 -05:00
mazmazz
0545c52970 Fix cv_usejoystick being reset to None when cv_usejoystick was > NumJoys and changing to already-used joystick 2018-12-14 06:05:31 -05:00
mazmazz
752fec8270 Fix menu where cv_usejoystick.value > I_JoyNum and selecting an unused controller and the "used!" prompt pops up erroneously 2018-12-14 05:57:10 -05:00
mazmazz
da69539718 Display "joystick used" prompt correctly if setting use_joystick from an old value > I_NumJoys() 2018-12-14 05:31:47 -05:00
mazmazz
f7727fac5a Don't override an already-active controller
* Menu improvements to tell the user that they can't set a controller if it's already active
2018-12-14 05:02:41 -05:00
mazmazz
732956088a Lots of changes to better support hotplugging and unstable device indexes
* Don't save cv_usejoystick/2 because hotplugging changes can be made invalid by next run
* Properly set cv_usejoystick/2 for menu toggling
* Force-disable a player's joystick if setting another player's joystick to the same device
* Properly set cv_usejoystick/2 value of BOTH target player AND other players when hotplugging and unplugging
2018-12-14 03:58:07 -05:00
mazmazz
18287c09bb Properly handle unstable device indexes for hotplug 2018-12-14 01:45:18 -05:00
mazmazz
601535fe41 Attempt to handle unstable device IDs 2018-12-14 00:22:25 -05:00
mazmazz
d2e39c660e Improve hotplug edge case with changing device indexes; return proper joy_open output on error 2018-12-13 23:52:04 -05:00
mazmazz
651c99c5e3 Change joystick log messages to DBG_GAMELOGIC 2018-12-13 23:26:07 -05:00
mazmazz
1cdbe75183 Handle unstable device index when hotplugging controller 2018-12-13 23:09:05 -05:00
mazmazz
85bfe704e2 Adjust SDL_JOYDEVICEREMOVED handler by checking the player's joy device explicitly 2018-12-13 22:26:13 -05:00
mazmazz
7dd6dba27e Merge tag 'SRB2_release_2.1.21' into vanilla-hotplug 2018-12-13 22:16:48 -05:00
wolfy852
aa5ee0ebf3 Restore a change lost in the merge madness, do some SDL_GameController prep 2018-12-10 09:00:15 -06:00
Digiku
3880da272b Merge branch '21-version' into 'next'
Update code versions to 2.1.21

See merge request STJr/SRB2!338
2018-12-06 17:20:45 -05:00
mazmazz
72e55b4623 Windows string adjustment 2018-12-06 15:42:58 -05:00
mazmazz
dac15d2283 Adjust version strings 2018-12-06 15:39:19 -05:00
wolfy852
a1fffe5755 Merge remote-tracking branch 'remotes/SRB2/vanilla-hotplug' into unfuck-gamepads
# Conflicts:
#	src/d_clisrv.c
#	src/d_netcmd.c
#	src/d_netcmd.h
#	src/dehacked.c
#	src/doomdef.h
#	src/g_game.c
#	src/hu_stuff.c
#	src/lua_baselib.c
#	src/m_menu.c
#	src/sdl/i_system.c
#	src/sdl/sdlmain.h
2018-12-06 13:07:39 -06:00
mazmazz
cc6daa751d Disable XINPUT before initing the joy subsystem 2018-12-06 14:03:46 -05:00
Digiku
31b88c5195 Merge branch 'execversion' into '21-version'
Block previous versions' config defaults with EXECVERSION consvar

See merge request STJr/SRB2!371
2018-12-06 12:41:20 -05:00
mazmazz
439fff4402 Register execversion and remove CV_SAVE because we write manually 2018-12-06 12:28:30 -05:00
mazmazz
49d899ffea a stray if block 2018-12-06 12:03:53 -05:00
mazmazz
86b3221986 alwaysfreelook -> alwaysmlook string 2018-12-06 12:02:45 -05:00
mazmazz
fd6f5a9fbd Add alwaysfreelook2 and mousemove2 to config versioning
* Change alwaysfreelook2 to be consistent with alwaysfreelook (the only one that wasn't the same)
2018-12-06 11:59:34 -05:00
mazmazz
c4f035dfa9 Controller hotplugging by always keeping joy subsystem on (thanks WOLFS)
(with log messages)
2018-12-06 10:54:58 -05:00
Digiku
d0011199a9 Merge branch 'fire-trigger' into '21-version'
Controller defaults: Set Ring Toss to right trigger instead of left trigger

See merge request STJr/SRB2!370
2018-12-06 08:15:38 -05:00
mazmazz
5e6e0d539b Use proper DD define for use_joystick 2018-12-06 06:50:18 -05:00
mazmazz
e8584f2535 Implement EXECVERSION consvar to invalidate previous versions' default config values 2018-12-06 06:28:34 -05:00
mazmazz
d488dd0763 Move joyaxis_fire default to right trigger 2018-12-06 05:55:56 -05:00
Digiku
4b16dec91e Merge branch '21-tweaks' into '21-version'
Change 2p controller defaults

See merge request STJr/SRB2!369
2018-12-06 05:48:06 -05:00
mazmazz
0e0ccf2ae6 Change 2p controller defaults 2018-12-06 05:26:28 -05:00
TehRealSalt
7f335e9c46 Actually, best of both:
Let Grow/Shrink revert itself when it changes to 0, as well as add a function for removing either. Means we don't have to modify every single > 0/< 0 check, and is overall cleaner.
2018-12-05 23:28:44 -05:00
TehRealSalt
2d9ad86d20 > 2
Same here
2018-12-05 22:54:06 -05:00
TehRealSalt
fbf0cb2211 < -2
I doubt this hurts anything, but might as well I guess
2018-12-05 22:53:34 -05:00
TehRealSalt
90f480faa2 Set Shrink timer, don't add to it 2018-12-05 22:51:08 -05:00
TehRealSalt
5e4bd29c9c Add Miku's author to credits. 2018-12-05 21:58:26 -05:00
Sal
2cd332f5c6 Merge branch 'force-spb' into 'master'
Beyond a certain threshold, forcefully give 2nd a SPB if one's not already out.

See merge request KartKrew/Kart!119
2018-12-05 21:43:59 -05:00
TehRealSalt
0b40488fb8 Give lap animation V_SNAPTOTOP as intended 2018-12-05 21:39:34 -05:00