SDL3: Make it the default, further Emscripten & Android fixes#3543
Conversation
Bump required version to 3.4.0. That version added some features which will be required for the GPU renderer.
Guess they are not required anymore?
…iting it This appears to be a regression (reported as SDL#15502)
Otherwise the Window is a blurry mess on 4k displays, at least on Linux
…wn which corrupts memory This can happen when the system graphic is invalid, as ResetGameObjects will init the data structures again Another issue with our fragile shutdown system :(
…s unncessary There also seems to be a codegen bug. Invoking of some constructors on shutdown results in "function signature mismatch". This prevents the global constructors to be called at the end. Manually invoke our onExit handler instead. Removed the extern from main as this emitted a warning Fix EasyRPG#3464
|
guess for the github runners I have to set them to SDL2. Looking at repology the first Debian/Ubuntu with a new enough SDL3 (3.4) are Debian 14 and Ubuntu 26.04 😅 |
| cfg.renderer.Lock("SDL3 (Software, Emscripten)"); | ||
| #elif defined(__wii__) | ||
| cfg.renderer.Lock("SDL2 (Software, Wii)"); | ||
| cfg.renderer.Lock("SDL3 (Software, Wii)"); |
There was a problem hiding this comment.
I guess the Wii (U) stuff here is not needed the next 10 years^^
There was a problem hiding this comment.
probably :D. If you want I can remove this for now.
Not really working. The second time a game starts it reports SIGSEGV and I cannot figure out the reason because the debugger does not catch the signal.
|
Figured out the Android crash with AI assistance... I noticed that it isn't really crashing, just terminating. So I dumped the Activity Stack and noticed that after the first game shutdown the Activity Stack is empty (no GameBrowser). Feeded this information into Gemini and the answer was that I must set Yeah that is a new SDL3 feature to get a clean environment on every restart. Disabling this behaviour indeed fixes the "crash" and it runs fine. |
… terminating the app We support restarting from the Game Browser so this restores the old SDL2 behaviour and makes everything work as expected.
The versions we build on have no or outdated (<3.4) SDL3 versions
Is more reliable and allows custom aspect ratios e.g. portrait mode games.
|
Everything should work now at least not worse than with SDL2 :D |
Type was signed in SDL2, now unsigned in SDL3. In general it seems fragile to store a 64 bit integer in an int in our struct, since documentation says:
I doubt this will bite us soon, but this could create some nice bugs, when there is a platform that uses some weird ID or a user touched 2147483647 times... :D But there is no easy solution, for example use also 64 bits or hash the id. |
|
hmpf maybe we should just make Valid concern though. I will fix this :) |
|
This broke our Flatpak because they only ship SDL3 3.2 ... Guess easiest solution is forcing SDL2 for now and hope they bump SDL3 sooner or later. >.> |

Draft as the Android fixes are missing cough - working on it.Though already good enough for testing Emscripten and other platforms if anything breaks.