Skip to content

Conversation

@timangus
Copy link
Member

@timangus timangus commented Aug 4, 2025

This isn't ready for review yet, I'm just putting it here as a placeholder/discussion point. It's a bare minimum get it compiling and ostensibly working effort. That being said there are quite a small number of things missing:

  • Video gamma/brightness support is missing as SDL 3 removed it citing difficulty supporting it; will need to be replaced with a shader I guess. Not sure what we do for the GL1 renderer.
  • SDL 3 seems to be more pixel density aware, though I confess I haven't looked into how or if that affects us.
  • Linux distros don't appear to have caught up yet in terms of having SDL 3 packages, so it's probably way too soon to merge to main anyway.

Actually that's it, I think; surprisingly straight forward. Much easier than 1.2 -> 2.0 was.

K_PAD0_PADDLE3, /* Xbox Elite paddle P2 */
K_PAD0_PADDLE4, /* Xbox Elite paddle P4 */
K_PAD0_TOUCHPAD, /* PS4/PS5 touchpad button */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key codes are passed to the CGame/UI API. If any mods/games added support for K_PAD0_LEFTSTICK_LEFT, etc in the menu, this change would break it. This is purely hypothetical—I don't know of such mods—but that's why these buttons were separate.

K_CONSOLE is never passed to VMs, so it's last.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I OK, I wondered what all that stuff was about. I've made a change on main to make this mapping more robust and a bit more readable, but I will also append the new buttons so they don't cause reordering.

@zturtleman
Copy link

By the way, icculus also ported ioq3 to SDL3. The function typedefs for casting function pointers seem cleaner in that port (for SDL_GL_GetProcAddress(), etc) . I haven't significantly reviewed either branch to have many comments about them.

@Calinou
Copy link

Calinou commented Aug 4, 2025

  • Video gamma/brightness support is missing as SDL 3 removed it citing difficulty supporting it; will need to be replaced with a shader I guess. Not sure what we do for the GL1 renderer.

See #632.

  • SDL 3 seems to be more pixel density aware, though I confess I haven't looked into how or if that affects us.

This probably won't have an effect on ioquake3 to my knowledge. I think mouse sensitivity is already DPI-independent, and 2D scaling has always been automatically scaled according to resolution in id Tech 3 (with the exception of console text, but /con_scale can fix that).

@timangus
Copy link
Member Author

timangus commented Aug 5, 2025

By the way, icculus also ported ioq3 to SDL3. The function typedefs for casting function pointers seem cleaner in that port (for SDL_GL_GetProcAddress(), etc) . I haven't significantly reviewed either branch to have many comments about them.

Two things I wish I'd known about before starting:

  1. Ryan's port.
  2. The semantic patching tool. That's cool.

Oh well, as I say it didn't take very long anyway. It's quite spooky how similar our patches turned out, though I missed some stuff he caught and vice versa, so it's net beneficial I guess. I had a quick skim through the video. Got slight spider man meme vibes at the sound section as I think most of the code he talks about saying "oh they have done X or Y..." was originally written by... Ryan 😁.

@timangus
Copy link
Member Author

timangus commented Aug 5, 2025

  • Video gamma/brightness support is missing as SDL 3 removed it citing difficulty supporting it; will need to be replaced with a shader I guess. Not sure what we do for the GL1 renderer.

See #632.

👍

  • SDL 3 seems to be more pixel density aware, though I confess I haven't looked into how or if that affects us.

This probably won't have an effect on ioquake3 to my knowledge. I think mouse sensitivity is already DPI-independent, and 2D scaling has always been automatically scaled according to resolution in id Tech 3 (with the exception of console text, but /con_scale can fix that).

The thing that made me suspect some pixel density shenanigans is going on is that for a given r_mode, on my high density display laptop when using SDL 3 the window appears much larger than it did under SDL 2. As I say though, I haven't looked into it in any detail, so that symptom could be something else entirely.

@timangus timangus force-pushed the sdl3 branch 2 times, most recently from ff5f3b5 to da32da8 Compare August 5, 2025 20:16
@timangus timangus marked this pull request as draft August 20, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants