Skip to content

Port codebase over to SDL3#85

Merged
modawan merged 1 commit intomodawan:masterfrom
loudbytes:sdl3
Feb 19, 2026
Merged

Port codebase over to SDL3#85
modawan merged 1 commit intomodawan:masterfrom
loudbytes:sdl3

Conversation

@loudbytes
Copy link
Copy Markdown

Important changes:

  • Added setRelativeMouseMode to Window class as the RelativeMouseMode function is now linked to the window in SDL3. The original function in Engine remains, it simply calls the one in Window.
  • MouseMotionEvent and MouseWheelEvent now use floats instead of int32s.
  • Remove handleWindowEvent from the Window class. This was a private method already so the ergonomics haven't changed and the code readability hasn't been impacted because both functions affected were already small. This is because the SDL_WINDOWEVENT event type doesn't exist anymore, and to check if its a window event you need to check if the event type is within a range. Instead of adding an additional if check, I deemed it preferable to move the switch case from handleWindowEvent to the handle method instead as it only had 3 cases.

None of these changes should introduce regressions and the project builds correctly on my system. It currently does not run because of an issue with GLEW, but Synchro has a PR lined up to swap over to GLAD instead, which is better supported and should fix the issue.

@modawan
Copy link
Copy Markdown
Owner

modawan commented Feb 19, 2026

Perfect, thank you very much!
Checked on my machine with SDL3 built from source (release-3.4.0) - engine, toolkit, imgui branch all work well. Checked on Windows with both SDL3 and GLAD changes - also no regressions.

@modawan modawan merged commit 86d483e into modawan:master Feb 19, 2026
2 checks passed
@modawan modawan added this to the Endar Spire milestone Feb 20, 2026
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.

2 participants