Nothing except the extra event loop in CL_ServerConnectionTicker uses this,
because we still use old menus with events rather than inputs,
and that has its own system for default controls.
The third argument is now 'digital' to get rid of that pesky global boolean
* Gamepad select option now displays the name of your gamepad on the right
* Switch to thin font when bind names are too long
* Reduced margins and shortened some control names to fit longer binds
* Fixed deadzone cvar always being player 1's
* Fixed missing arrows on deadzone cvar (this NEEDS to be a macro...)
* Only accept inputs from the current player's gamepad, shouldn't be a
problem since your chosen gamepad is displayed now
* Show all 8 instead of 7 gamepads in gamepad select
Still has stuff to resolve but it kinda works now. Bots should turn correctly now but replays that have bots added at the race start don't play for whatever reason. Ghosts have been fixed and no longer crash the game after they end.
* Previous control checking flow:
* Current controller/keyboard (userbound controls).
* If on a menu:
* Current controller/keyboard (default controls).
* All controllers not in use by a player (default controls).
* New control checking flow:
* Current controller/keyboard (userbound controls).
* If player 0 and just checked a controller, check keyboard (userbound controls).
* If on a menu:
* Check all controllers not in use by a player (userbound controls).
* If keys are inaccessible/unbound and keybind is necessary to navigate menus, repeat eveyrhting with default controls.
* Instead of duplicated code, control the flow in a finer fashion.
* Now able to detect if gamepad inputs are possible to recieve (via checking deviceID), instead of assuming they are.
* If a keybind is set but inaccessible by the above metric, make it flash on the Profile Controls screen.
* Fix out-of-order key mappings for a given bind being invisible on the Profile Controls menu.
if you fail to respawn properly (die while respawning) you get placed at the next waypoint. Code was also adjusted so the next waypoint can't be the same as your current one if you are detected as going backwards, helps on turns that sometimes face you towards the previous waypoint. Respawning angle for both respawn fallbacks now gets the angle by comparing x and y of the current waypoint and next waypoint to guarntee you are facing the correct direction
For some reason gamepads have not been registering buttons for a while, which makes this pretty hard to continue. Not sure if it's to do with how the menu cmd is generated, or something deeper in the SDL code.
Ultra mega hacked in, by saving all "discarded" joysticks to an array so they don't get totally closed & we can still poll them. Events now properly send the device number instead of the player number, which means we can store all controllers pressing buttons, and thus, can detect when ANY controller is pressing anything, and THUS we can make the character select work like we wanted to :V
Did not bother fixing any of the bugs, however. First of all, the opening menus do not properly fallback to default controls. Yet again, we may need a more robust system -- storing all keys from gamekeydown separately? Additionally it seems like when I input gamepad it makes me use keyboard anyway, so I think something fishy is up.
(G: finally, a commit that mostly survived... deviceResponding is useless
for us right now but might as well keep it. maybe easier assignment on
the multiplayer setup menu in the future?)