Commit graph

101 commits

Author SHA1 Message Date
Sally Coolatta
632df264a3 Merge remote-tracking branch 'public/next' into discord-rpc-support 2020-08-16 20:57:31 -04:00
Alam Ed Arias
2a116ac847 Tested to be compile with Mingw64 9.1.0
(cherry picked from commit 5a79a446dfc3632de3e27567afd65d9782510739)
2020-05-11 18:43:24 -07:00
Sally Cochenour
f2aa2bb541 'sal-lighting' code ports from v2 2020-04-25 20:56:50 -04:00
James R
15ac2982c0 Handle log file in parent properly 2019-12-16 19:28:42 -08:00
James R
e0264d5fb1 Add this back for Windoodoo because I'm an idiot 2019-12-16 19:27:55 -08:00
James R
d29a598564 Rename signal caught message to be more obvious 2019-12-16 19:27:55 -08:00
James R
319c28db45 Fix signal handler setup error reporting 2019-12-16 19:27:55 -08:00
James R
5b960672e9 Rename I_StartupKeyboard to I_RegisterSignals and call it in a sane place 2019-12-16 19:27:54 -08:00
James R
8c0976a6cb Kill child when wait fails, so I_Error exits both 2019-12-16 19:27:54 -08:00
James R
18943a24db Fix idiot mistake 2019-12-16 19:27:54 -08:00
James R
e961a901e4 Move everything to i_system.c
This also simplifies things; SDL isn't initialized in the parent process.
2019-12-16 19:27:53 -08:00
James R
c6a882f303 nix: Fork before game code and wait to catch signals and coredumps
Ditched signal_handler to avoid worrying about async-signal-safe functions.
D_QuitNetGame is not called, so players whose programs are interrupted by a
signal will time out from the server. Because the game runs in a child process,
the window can close before the "Signal Caught" text box appears.

"(core dumped)" is also included in the message if core dumping could be
determined.
2019-12-16 19:27:35 -08:00
fickleheart
f60e92aa70 Move public demo vars to a single struct 2019-03-24 21:32:15 -05:00
wolfy852
088bfd30d0 Stop Linux servers from hanging every 34 hours
This drastically increases the amount of time Linux servers can stay up for before hanging.
2019-02-28 18:51:57 -06:00
Sally Cochenour
1928721218 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
1c8c6387fc -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
fd99eb4f13 -noxinput command line parameter 2019-01-09 01:38:28 -06:00
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
b5b9703b8b Make I_GetJoystickDeviceIndex account for controllers 3 and 4 2018-12-27 18:28:09 -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
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
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
wolfy852
aa5ee0ebf3 Restore a change lost in the merge madness, do some SDL_GameController prep 2018-12-10 09:00:15 -06: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
mazmazz
c4f035dfa9 Controller hotplugging by always keeping joy subsystem on (thanks WOLFS)
(with log messages)
2018-12-06 10:54:58 -05:00
TehRealSalt
bf3a9d1d2e Edited even more things to say "SRB2Kart" 2018-12-05 20:40:58 -05:00
TehRealSalt
26315ccf63 Merge remote-tracking branch 'srb2public/master' into merge-next 2018-12-05 19:21:13 -05:00
Digiku
2c557d668a Merge branch 'joystick-juggling' into 'master'
Joystick juggling

See merge request STJr/SRB2!355
2018-12-04 11:51:55 -05:00
mazmazz
a7b12b3ce5 Use static joyname instead of malloc 2018-12-03 12:35:12 -05:00
mazmazz
856f826afb Copy string from SDL_JoystickNameForIndex before the subsystem is shut down 2018-12-03 05:37:07 -05:00
Monster Iestyn
dadaf83e41 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
4507ee18fd Merge remote-tracking branch 'srb2public/next' into merge-next 2018-11-29 08:49:50 -05:00
Monster Iestyn
0bff44e22b 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
0c30cd0fa1 Merge branch 'master' into responsefile-fix 2018-11-22 23:02:20 -05:00
Sryder
9350721d12 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
51ee510b85 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
b34e8c5390 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
d7a0a3c94b Update copyright info on some files 2018-11-01 14:47:19 -04:00