-
Notifications
You must be signed in to change notification settings - Fork 3
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
function signature mistake #3
Comments
These functions write to the pointers that are passed in if non-null. This reflects the underlying API. The arguments should perhaps be renamed to |
I mean, is the prebuilt SDL2.so/dll provided by gamedev modified? These two functions in SDL2 have no return value. |
Sorry, misunderstood the OP. You are correct, we are incorrectly defining the SDL procs as returning ints (as if they return an error code) but these should be void functions. SDL3 does return values for these fns if there was an error. We probably mistakenly brought that change into our SDL2 bindings at some point. |
In SDL_video.h, SDL_GetWindowPosition and SDL_GetWindowSize do not have a return value.
zsdl/src/sdl2.zig
Line 238 in 991c071
zsdl/src/sdl2.zig
Line 244 in 991c071
The text was updated successfully, but these errors were encountered: