-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fixes for rwobject (now iostream) SDL3 #2933
Conversation
1 failing check due to numpy.alltrue being removed in numpy 2.0. |
6e70144
to
6ab3edf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, this looks good to me 👍
This PR was made a while back, has there been any SDL3 changes in the meantime that makes this PR need changes? |
ec1bae0
to
f5cffaf
Compare
0fc7fd5
to
7244df0
Compare
22fb3b5
to
7202d48
Compare
To compile: no I've updated it now and it should be good. I'm aware the rwobject.c changes probably look scary: all my changes have been for the SDL3 code paths, SDL2 is unaffected by these changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This PR is perfectly SDL2 safe and passes SDL3 CI. Should be good to go now, thanks! 😎
In SDL3, the RWops system has been remade into the IOStream system.
So, for SDL itself they have an oldnames compatibility layer that I've enabled at compile time for my SDL3 experimentation. This means our code can still say "SDL_RWops*" and other "RW" things. But they don't have this for the satellite libraries (yet?), so I've gone ahead and implemented explicit preprocessor macros to switch the "RW" load functions to the "IO" load functions.
The system has also changed how custom RWops are created, and the signature of the callbacks, so this patch fixes that to work in both SDL2 and SDL3. It's one of the more complex patches I've submitted for SDL3 support, but the big idea of it is that it doesn't change anything in SDL2, to stay safe.