Skip to content

Conversation

@A007331
Copy link

@A007331 A007331 commented Jul 11, 2025

This SDL3 minimal patch may be useful to the many forks of rxi/lite.

Rationale:

  • the newly-released SDL3 has clear improvements, and will be supported for a long while
  • SDL2 support will be removed shortly in some OSes in favor of sdl2-compat.

This change is split into 3 logical commits:

  • The first has the code changes for Linux and Windows ;
  • The second removes the vendored windows-build SDL2 binaries and headers
  • The third adds the vendored windows-build SDL3, in the same way as upstream for partial compatibility.

A007331 added 3 commits July 7, 2025 07:46
Notes:

- Only three meaningful changes were needed:
  * adding a call to SDL_StartTextInput() in main.c
  * updating and unifying the get_scale() DPI code (CAUTION: cannot test)
  * move window event blocks in f_poll_event() in system.c

- Linux: works with system or user-provided SDL3 libraries
  Linking SDL3 statically is possible with small modifications to build.sh,
    by adding custom include and libdirs in cflags and ldflags, and
    changing linking for "-Wl,-Bstatic -lSDL3 -Wl,-Bdynamic ..."
  A statically-linked SDL3 can still use dynamic dlopen() to load the platform libs

- Windows: vendored SDL3 headers and libs are NOT UPDATED in this commit.
  These files will be updated in the next two commits.
  If using this commit, bring your own SDL3.dll and headers
    into winlib/SDL3-3.2.16/x86_64-w64-mingw32/{include/,lib/,bin/}
…iginal lite with SDL2

This is only for keeping the same structure as in the original lite ; we'll create another
repo without any vendoring (Lua or SDL), to have an actual lightweight repository.
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