Commit graph

147 commits

Author SHA1 Message Date
NepDisk
3dab43cbcc Rumble on wall hit 2026-02-15 23:58:10 -05:00
minenice55
ca9abfc9f8 prelim work for sensors and other outputs 2026-02-15 23:27:46 -05:00
NepDisk
ead335b1fd Fix keyboard input
Thanks once again Alug!
2026-02-15 17:27:24 -05:00
minenice55
fb5287f335 fix keyrepeat for gamepad sticks
hats are still broken
2026-02-15 16:02:07 -05:00
NepDisk
8a9683542b Fix Gamepads
Thanks thanks thanks thanks so much Alug for the time working on this!!!!!
2026-02-14 16:27:53 -05:00
minenice55
e3f098b736 add the new buttons to keynames 2026-02-13 13:58:35 -05:00
NepDisk
1ca56d100a Rename joystick index related things to joystick id
Since SDL3 doesn't use indexes this should make it less confusing when I start working on this
2026-02-12 16:14:47 -05:00
yamamama
055a93b654 Dedicated horn button
From indev talks: it'd be better to bind horns to a dedicated button,
than for it to occupy more "important" inputs like item/ring usage and looking backwards
2026-02-01 16:16:02 -05:00
yamamama
bcb247dc14 Start a bit of work on input threads 2026-01-26 13:40:23 -05:00
NepDisk
6aac27ff1d Add cvar to allow bubbleboost to mow offroad and shield boost rumble support
On maps with tripwires these are great for shortcuts not so much with offroad only setups. Lets try to level the playing field.

Oh and also lets add rumble support for flame and bubble boosts since it feels nice.
2026-01-21 20:11:20 -05:00
NepDisk
bd6b529b01 Global init
these were found by alug
2026-01-17 02:04:31 -05:00
NepDisk
6d6cb09280 Convert most strcmp/stricmp to fastcmp/fasticmp 2025-12-11 13:00:32 -05:00
NepDisk
37982ed7b2 make Controller Rumble strength use changable
613d646627
2025-11-23 13:28:14 -05:00
Alug
413c346d82 G_DeviceRumbleTick: get rid of magic numbers
use named constants instead
2025-11-23 13:13:20 -05:00
NepDisk
96e32419ac move gamepad led and rumble tickers into g_input
21f0d603c3
2025-11-23 13:09:05 -05:00
NepDisk
c030d46462 [PATCH] Fix up Rumble and LED stuff and add extra drift stuff to rumble
Thanks Alug!
2025-11-20 16:49:35 -05:00
NepDisk
f7bf52bcfa Use proper gamepad retrival function for rumble and add LED ticker 2025-11-20 15:17:13 -05:00
NepDisk
b337a9e69a Port Saturn's rumble and gamepad LED systems 2025-11-20 14:39:37 -05:00
NepDisk
a61002bf79 Port Litesteer from RR and make turn easing per player 2025-10-16 22:07:00 -04:00
NepDisk
88ecd2f5d6 Update the director to the saturn version 2025-08-17 10:48:05 -04:00
NepDisk
ec7fbb9be8 [PATCH} FIx controller hotplug
Thanks Alug
2025-08-07 09:26:54 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
GenericHeroGuy
dc791e494d Merge branch 'blankart-dev' into socmenus 2025-03-26 18:49:30 +01:00
NepDisk
35a7f420af Fix spectate button, allow respawning local players 2-4, allow respawn to be binded to button 2025-03-24 18:54:58 -04:00
GenericHeroGuy
a609c7b5ce Replace prevmenu with menustack
menustack[0] replaces both menuactive and activeMenuId
Hopefully this is the last major change to the codebase...
2025-03-23 01:47:19 +01:00
NepDisk
89c5ece49b Merge branch 'blankart-dev' into newinput 2025-03-13 01:50:07 -04:00
GenericHeroGuy
15e12d2c96 Fix default controls and loading controls 2025-03-13 02:44:17 +01:00
GenericHeroGuy
b3ce5c8a85 Prettier default controls table
See if you can spot the new default controls I added :^)
(i needed an excuse to put a KEY_AXIS1 in there in case these get updated)
2025-03-13 00:44:03 +01:00
NepDisk
8f0a8860c6 Default turnsmoothing to Off
Someone is bound to complain at first if these is on by default
2025-03-11 22:58:55 -04:00
GenericHeroGuy
bfcee5d6c2 Remove menu defaults/backup code from G_PlayerInputAnalog
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
2025-03-11 22:21:45 +01:00
GenericHeroGuy
f547af9992 Simplify gamepad axis code
Yes I intentionally spelled it JOYAXISES to not conflict with the old define
2025-03-11 20:38:37 +01:00
Eidolon
4d65f09eb7 Port Ediolon's SDL GameController work
Basically instantly solved all of the issues that made this branch completely unusable
2025-03-11 20:01:25 +01:00
GenericHeroGuy
e669ca6edb Restore turn smoothing in the most horrific way possible 2025-03-11 01:44:25 +01:00
GenericHeroGuy
ef1489aa04 Cleanup, fix menu controls and keyboard 2025-03-10 15:06:52 +01:00
toaster
144e967ee5 Rework the entire G_PlayerInputAnalog system.
* 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.
2025-03-10 11:04:00 +01:00
Sally Coolatta
9b3067a7a2 Fix control saving 2025-03-08 00:56:53 +01:00
Sally Coolatta
11bd4c453e Almost multiplayer char select
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.
2025-03-08 00:21:37 +01:00
Sally Coolatta
0a98ca63ab First pass on character select device select
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?)
2025-03-07 23:44:59 +01:00
GenericHeroGuy
f419ccee57 New input handling (port of cd8862f0)
More or less a port with gamecontrols left untouched.

Some notable differences:
* ev_joystick now has a separate data1 for each axis, rather than having you
  check which of data2/3 is INT32_MAX and which one isn't
  (pissed me off when updating menu code...)
* Gutted the 1.6 upgrade code, since we're not upgrading from anything :P
* G_GetControlForKey, a helper for menu code
* Turn smoothing code left unused as a reminder to fix it
* Various small fixes so this commit is playable and doesn't segfault

Menu changes:
* Max 4 binds, joystick axes are now bindable like any other button
* The gamepad options submenu has been replaced by its two remaining options
  after the removal of axis cvars (gamepad select and deadzone)

See cd8862f0's message for more details
2025-03-07 00:05:35 +01:00
NepDisk
92bda9519a Reimplement turn smoothing plus toggle 2024-09-18 10:17:35 -04:00
NepDisk
a733ea2baa Port Use SDL Game Controllers API by Eidolon 2024-08-16 21:18:18 -04:00
NepDisk
699e607ec7 Implement controller stuff 2024-08-07 15:27:48 -04:00
NepDisk
dea5d0c897 remove more spindash leftovers 2024-08-04 13:47:37 -04:00
toaster
287dd0bed5 Merge branch 'asan-internal' into 'master'
ASAN fixes for Internal

See merge request KartKrew/Kart!678
2024-07-31 02:12:15 -04:00
James R
d6dc33e024 Add spindash to gamecontrolname 2021-04-04 22:47:57 -07:00
Sally Coolatta
0a10396c84 Spindash shortcut button 2021-03-09 17:28:20 -05:00
Sally Coolatta
7c2bd0d1c2 Merge remote-tracking branch 'srb2/next' into the-scary-22-merge 2020-10-24 20:50:58 -04:00
Sally Coolatta
9b6aa946ea Merge remote-tracking branch 'srb2/master' into the-scary-22-merge 2020-10-24 19:28:06 -04:00
James R
b7c4a82a0f Replace C90's junk with a modest macro 2020-10-06 23:04:23 -07:00
Sally Coolatta
6ef0af4ba5 g_game and g_input now compile 2020-08-13 00:05:44 -04:00