Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Incomplete] Initial SDL3 support #54

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[Incomplete] Initial SDL3 support #54

wants to merge 1 commit into from

Conversation

sulix
Copy link
Owner

@sulix sulix commented Apr 4, 2023

Add VL, SD, and IN backends for SDL3. We do this instead of using the combined SDL1/2 backends for SD and IN, as so many functions have been renamed. This does present some problems, as otherwise they share a lot of code, so one will likely end up outdated.

Otherwise, this is still incomplete:

  • No CMake support.
  • Sound is broken with SDL_QueueAudio
  • Graphics is probably broken on big-endian.
  • The pkg-config bits in the makefile are a bit ugly.
  • One day we'll want an SDL3_gpu based VL backend, but the renderer is good for now.

Add VL, SD, and IN backends for SDL3. We do this instead of using the
combined SDL1/2 backends for SD and IN, as so many functions have been
renamed. This does present some problems, as otherwise they share a lot
of code, so one will likely end up outdated.

Ideally, some of the 'generic' code, particularly in id_sd, can be split
out a bit.

Otherwise, this is still incomplete:
- Some code, particularly in id_sd, is dead.
- Graphics is probably broken on big-endian. (Though even SDL2 seemed
  broken on NetBSD/arm64eb, though that's weird enough I can't guarantee
  it'd work anyway.)
- The pkg-config bits in the makefile are a bit ugly.
- We'll possibly want support for vendored SDL3 at some point, too.
- One day we'll want an SDL3_gpu based VL backend, but the renderer is
  good for now.
- The SDL3 API is changing rapidly, so this needs to keep up

One notable change is that all includes of "SDL.h" need to be replaced
with an include of "ck_cross.h", which has the correct logic to include
"SDL3/SDL.h" where needed. WITH_SDL is now set to 3 for SDL3 builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant