Skip to content

sdl 1/2 + wasm #145

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

Open
wants to merge 74 commits into
base: rockdroid
Choose a base branch
from
Open

sdl 1/2 + wasm #145

wants to merge 74 commits into from

Conversation

humbertodias
Copy link

@humbertodias humbertodias commented Jul 9, 2025

Changes

  • Added support for SDL2 while retaining SDL1 compatibility.
  • Added macOS compilation script
  • Rockbot_Editor.pro adapted for QT5 on macOS
  • Added CONFIG += debug in RockDroid.pro
  • Added build-wasm.sh on https://humbertodias.github.io/rockbot/
  • Creating sdl_layer to abstract SDL1 and SDL2
  • All compilation warnings removed

Tested on Ubuntu 25.04

sdl2-ubuntu.mp4

Tested on macOS Sequoia

sdl2-macos.mp4

Browser - 60fps

Screenshot 2025-07-11 at 11 00 02 PM

@humbertodias humbertodias marked this pull request as draft July 9, 2025 06:51
@humbertodias humbertodias marked this pull request as ready for review July 9, 2025 08:15
@protoman
Copy link
Owner

protoman commented Jul 9, 2025

Can you make the change optional through a defined macro/flag?
Like #ifdef SDL2 #include <sdl2/sdl.h> #else #incvlude <SDL/sdl.h> #endif
There is a reason I did not port to SDL2 yeat, that are most platforms like PS2, Dingoo, PocketGo and others do not have support for it. I do not want to simply kill those ports yet.
I was working in a kind of abstraction layer to make switching SDL/SDL2/whatever easy like that, but never got much further with the idea.

@humbertodias humbertodias changed the title sdl2 sdl2 + wasm Jul 12, 2025
@humbertodias humbertodias changed the title sdl2 + wasm sdl 1/2 + wasm Jul 12, 2025
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