Sally Cochenour
1e61cc6152
Better cpusleep
...
- Default to 1, which means potential for a 1-frame loss every once in a while but no longer a complete cpu hog
- New minimum is 0, since -1 just did the exact same thing as 0.
2019-01-28 14:12:08 -05:00
wolfy852
a8e0805261
-nohidapi parameter
...
Should fix problems where Switch Pro controllers suddenly had their mappings changed. Does not recognize controllers connected before game launch. Make sure to replug your controller after the game launches if using this param.
2019-01-10 23:12:06 -06:00
wolfy852
5e682d612f
-noxinput command line parameter
2019-01-09 01:38:28 -06:00
wolfy852
7a9e6161ae
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
266e255bb6
Reorganize some of the code for SDL_JOYDEVICEADDED events
2018-12-28 14:20:28 -06:00
wolfy852
eb729c55e4
Make I_GetJoystickDeviceIndex account for controllers 3 and 4
2018-12-27 18:28:09 -06:00
wolfy852
203050dc04
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
2a0e6937a0
Extend joystick hotplugging to players 3 and 4
2018-12-19 18:08:38 -06:00
wolfy852
fc3578c592
Revert GameController stuff
2018-12-19 13:11:30 -06:00
wolfy852
f876a59ad2
I_NumGameControllers, print GameController mapping, and store joystick GUID in JoyInfo
2018-12-14 12:49:07 -06:00
wolfy852
ca2475ac3e
Print GameController info when detected, use proper 360 controller defaults for triggers
2018-12-14 11:50:53 -06:00
mazmazz
c49a5ed8d2
Better I_InitJoystick log message
2018-12-14 06:14:21 -05:00
mazmazz
e548f6f139
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
3b6de810e1
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
6b9fe87b60
Properly handle unstable device indexes for hotplug
2018-12-14 01:45:18 -05:00
mazmazz
44d6a1d236
Attempt to handle unstable device IDs
2018-12-14 00:22:25 -05:00
mazmazz
216e710b87
Improve hotplug edge case with changing device indexes; return proper joy_open output on error
2018-12-13 23:52:04 -05:00
mazmazz
14cde2d227
Change joystick log messages to DBG_GAMELOGIC
2018-12-13 23:26:07 -05:00
mazmazz
e81f05c496
Handle unstable device index when hotplugging controller
2018-12-13 23:09:05 -05:00
wolfy852
2927812ec4
Restore a change lost in the merge madness, do some SDL_GameController prep
2018-12-10 09:00:15 -06:00
wolfy852
5fe81afeaa
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
60afce5771
Disable XINPUT before initing the joy subsystem
2018-12-06 14:03:46 -05:00
mazmazz
6694b7d679
Controller hotplugging by always keeping joy subsystem on (thanks WOLFS)
...
(with log messages)
2018-12-06 10:54:58 -05:00
TehRealSalt
7ab098636b
Edited even more things to say "SRB2Kart"
2018-12-05 20:40:58 -05:00
TehRealSalt
df191639bd
Merge remote-tracking branch 'srb2public/master' into merge-next
2018-12-05 19:21:13 -05:00
Digiku
631f6ed406
Merge branch 'joystick-juggling' into 'master'
...
Joystick juggling
See merge request STJr/SRB2!355
2018-12-04 11:51:55 -05:00
mazmazz
8851f39b84
Use static joyname instead of malloc
2018-12-03 12:35:12 -05:00
mazmazz
19d19543b7
Copy string from SDL_JoystickNameForIndex before the subsystem is shut down
2018-12-03 05:37:07 -05:00
Monster Iestyn
a63ba7084a
Disable the axis parts of I_GetJoystickEvents and its player2 counterpart.
...
(This is what I should have done in the first place)
2018-12-02 17:42:51 +00:00
TehRealSalt
5534017954
Merge remote-tracking branch 'srb2public/next' into merge-next
2018-11-29 08:49:50 -05:00
Monster Iestyn
08af33c51f
Add myargmalloc boolean to detect whether we allocated myargv ourselves or not, so we don't free myargv if we didn't
2018-11-23 19:12:48 +00:00
Steel Titanium
fe43deacec
Merge branch 'master' into responsefile-fix
2018-11-22 23:02:20 -05:00
Sryder
6af56273bf
Merge branch 'next' of git@git.magicalgirl.moe:STJr/SRB2.git into nextmerge
...
# Conflicts:
# src/d_main.c
# src/d_main.h
# src/d_netcmd.c
# src/doomtype.h
# src/hardware/hw_md2.h
# src/p_user.c
# src/r_splats.h
# src/s_sound.c
# src/s_sound.h
# src/screen.c
# src/sdl/i_system.c
2018-11-10 21:14:53 +00:00
Monster Iestyn
51df32dd3d
Merge branch 'gcc-compiling-cleanup' into 'master'
...
Compiling cleanup and fixes
See merge request STJr/SRB2!311
2018-11-10 13:56:17 -05:00
Monster Iestyn
0bdbdd1b1e
Remove FUNCMATH from functions with a void return value or args, or examine variables other than their args (which could be modified)
2018-11-08 16:26:55 +00:00
Steel Titanium
5a0cfc10f4
Update copyright info on some files
2018-11-01 14:47:19 -04:00
toaster
a1e1aa81b5
Merge branch 'next' of https://git.magicalgirl.moe/STJr/SRB2.git into nextmerge_plus_rain
...
# Conflicts:
# src/d_netcmd.c
# src/d_netcmd.h
# src/g_game.c
# src/p_floor.c
# src/p_user.c
# src/r_data.c
# src/r_data.h
# src/v_video.c
2018-10-14 21:52:05 +01:00
Sryder
497314fdc4
Tiny fix so that joystick2 being closed can let the JoystickSubSystem close before game close.
...
No memory leak here, just a very tiny thing I noticed.
2018-10-09 19:43:18 +01:00
Steel Titanium
f88708bb75
Fix the weird indentation
2018-09-21 12:05:52 -04:00
Steel Titanium
68ec811909
Rearrange the code.
...
Thanks again MonsterIestyn!
2018-09-21 11:26:08 -04:00
Steel
af58ba9ae3
Remove this that somehow slipped in.
2018-09-21 07:21:49 -04:00
Steel
be74b4e58b
Fix up errors with buildbots
2018-09-21 07:16:54 -04:00
Steel Titanium
378495cb2b
Add some stuff
2018-09-20 18:33:50 -04:00
Steel Titanium
a53f036149
Use MemAvailable instead
2018-09-20 18:30:46 -04:00
toaster
97348beb66
Fix all compilation errors (tested using DEBUGMODE=1 and ERRORMODE=1) that remain outstanding. Notably:
...
* Remove FUNCMATH from all void-returning functions, given GCC80 specifically complains about this case.
* Extend the length of all extant buffers to the safety threshold recommended by the compiler.
* Add void casts to WS_getaddrinfo's setting to prevent complaints about incompatible typecasts.
* Extend the charsel, face, and superface buffer sizes and writes to include the null terminator. (I didn't really want to do this because it's not even particularily NEEDED, but there was literally zero way to get around the request that I could find with multiple online searches. I tried.)
2018-07-07 16:52:01 +01:00
Steel Titanium
5c8c35e773
Deallocate when I_Quit() is called instead.
2018-06-23 15:09:11 -04:00
TehRealSalt
36b52e1c67
Merge remote-tracking branch 'refs/remotes/srb2public/next'
...
# Conflicts:
# src/f_finale.c
# src/hardware/hw_draw.c
# src/hardware/hw_main.c
# src/m_misc.c
2018-04-07 18:43:59 -04:00
TehRealSalt
7516a1dc0c
Doing one more step to totally ensure that matchesplayed is unlocking stuff
2018-03-30 12:16:15 -04:00
Monster Iestyn
4a0305eec8
more I_GetFreeMem fixes: don't attempt to set *total to 0L if total itself is NULL
2018-02-23 20:40:19 +00:00
Monster Iestyn
1216c9da18
Use __linux__ instead of LINUX/LINUX64
...
Turns out compiling for Linux 32-bit using the Makefiles never actually defines LINUX! Apart from that, most of the existing Linux-specific code in SRB2's source code (except for tmap.s) actually uses __linux__ instead anyway
2018-02-23 20:21:16 +00:00