Commit graph

41 commits

Author SHA1 Message Date
James R
fba66c4084 Do not disable and reenable sounds entirely when window focus changes
Sounds are not started if the window is unfocused,
regardless of sound_disabled.

Fixes -nosound not working (sounds would always be
reenabled if window comes into focus).
2025-09-20 17:45:38 +02:00
NepDisk
ef481b936f Use US default as default... Crazy 2025-09-14 10:55:12 -04:00
NepDisk
5f97577561 Add cvar for keyboard layout 2025-09-14 10:52:38 -04:00
NepDisk
72596e8d03 Port addfilelocal from saturn
Modified to turn off features we don't have / prevent resyncs
2025-09-14 01:06:05 -04:00
NepDisk
d00e674088 Port Native keyboard 2025-09-13 22:41:48 -04:00
GenericHeroGuy
e92362f36c (WIP) Rewrite screen capture code for GIFs
Downscaling is now performed during screen capture instead of GIF writing
This may or may not make GIF recording faster?
Maybe it would be faster if I knew how OpenGL worked...
Regardless, the m*th in the GIF code is gone, fixing the high/odd res issues

Also includes a little deduped hardware code, and GL 4.3 debugging code
2025-09-09 23:09:51 +02:00
StarManiaKG
a2ecd5dbdd Set maximum window size for SDL 2025-09-06 15:45:09 -04:00
NepDisk
325d14e1a0 Thanks debian 2025-09-03 09:41:22 -04:00
NepDisk
b4304ca9df Refactor software blitting logic
eabb09e14e
2025-09-02 21:56:55 -04:00
GenericHeroGuy
423a9ee8a6 Lots of fixes for the intermission background
* On GL, the background no longer disappears if the game is paused
* On GL, changing resolutions now draws SRB2BACK instead of a white void
* On software, changing resolutions redraws the level instead of awkwardly
  stretching the background to fill the screen
2025-08-27 21:32:47 +02:00
NepDisk
b865638cb8 Port restrict and LIKELY/UNLIKELY macros and mark stuff for blitting loop as const and with register 2025-08-18 09:59:58 -04:00
GenericHeroGuy
34f7d76aeb Switch to calling SDL_GetDesktopDisplayMode in VID_GetRefreshRate
Avoids freezing on SDL3 + X11, otherwise behaves the same on My Machine(tm)
Also remove that annoying useless mouse grab on startup
2025-08-17 18:06:35 +02:00
NepDisk
a61d92cc5b Finish porting SRB2Classic blitstuff 2025-08-16 17:59:55 -04:00
Gustaf Alhäll
2c0120055d Fix segfault on startup on software 2025-08-16 17:50:45 -04:00
NepDisk
e0d0d99cf3 Borderless window toggle
https://github.com/Indev450/SRB2Kart-Saturn/pull/193
2025-08-13 19:26:25 -04:00
toaster
55825960ba Fixed Oni's controller-related SIGFPE 2025-08-06 21:48:47 -04:00
NepDisk
d3f261b0d3 Add OpenGL hint to SDL 2025-07-27 12:02:07 -04:00
NepDisk
2f84779d41 Update rest of the existing files to use blankart branding 2025-07-01 00:23:30 -04:00
NepDisk
db66b00ec0 Merge branch 'blankart-dev' into socmenus2 2025-06-19 13:05:47 -04:00
NepDisk
1947eb6277 Remove GS_CONTINUING and GS_GAMEEND 2025-06-13 10:25:52 -04:00
NepDisk
a306d117a8 Fix music going away on unfocus 2025-06-11 00:38:15 -04:00
GenericHeroGuy
5a0a889cd1 Menu functions now return INT32
Just my best guess what everything should return. Doesn't matter right now
2025-06-05 19:47:08 +02:00
NepDisk
c958ce87ca I_RegisterSysCommands so video cvars are registerd before menu init happens 2025-06-03 13:47:29 -04:00
NepDisk
de91aa3a13 Clean up of I_video port 2025-06-03 12:52:32 -04:00
NepDisk
00d08c851f i_video.c refactor port
based on 4de2d81815
2025-06-03 12:06:19 -04:00
NepDisk
64e99e8c26 fix video menu coloring and add extra video modes 2025-05-21 10:43:31 -04:00
NepDisk
3163dcf9c4 Remove bird window shake
sorry jartha
2025-05-15 14:35:46 -04:00
NepDisk
099bdb1be0 Custom width and height support 2025-04-19 22:43:03 -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
GenericHeroGuy
f51868ed3f No more menu_t definitions, use menutype constants everywhere 2025-03-22 01:40:33 +01:00
GenericHeroGuy
a23197cf8d god i hate cvars 2025-03-15 03:54:17 +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
Sally Coolatta
e1ffc206e7 Finish some unused SDL hat input support to use events rather than polling all of the time 2025-03-11 15:17:51 +01:00
Sally Coolatta
a934e09b0c Properly implement joystick axes
NOW it's fully navigable with controller
2025-03-08 01:00:56 +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
toaster
39ad512bb8 Merge branch 'vsync-set-fix' into 'master'
Set vsync on screen update or resolution change in software mode

See merge request KartKrew/Kart!765
2025-02-09 16:16:47 -05:00
NepDisk
3371f638e3 Sdldraganddrop utf8 on windows
https://github.com/Indev450/SRB2Kart-Saturn/pull/60/
2025-02-09 12:48:37 -05:00
NepDisk
f09cba8dc3 Addfile per drag and drop 2025-02-09 12:43:00 -05:00
NepDisk
bb566685e4 Port opengl VHS effect from SRB2Kart-Saturn
Does not include uncap stuff currently
2025-02-09 11:31:45 -05:00
Eidolon
a6aeb1194f Merge branch 'convert-sdl-i-video' into 'master'
cxx: Convert sdl/i_video.cpp

See merge request KartKrew/Kart!872
2024-12-30 00:00:30 -05:00
Renamed from src/sdl/i_video.c (Browse further)