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
translated sdl.zig file is incorrectly big-endian #10
Comments
Looking into it, it seems like the empty An alternative would be to remove the stub files, and add |
Thanks for info! Yeah, i have very good reasons to do this, and i know of the shortcomings of this method. My goal is to ultimativley not depend on SDL headers anymore and just use the (hand-translated) file with the correct semantics instead. This allows us to have nicer types, correct usage of enums, and only the SDL2 API in there. If you are using the |
Not sure why this is happening, but the
src/binding/sdl.zig
looks like it assumes big endian.Symptoms (the ones I've found, I'm kind of new to SDL though, there might be more):
MSB
instead ofLSB
constants.These are observable in the current master branch, it's the same when locally regenerated on my x86_64 (little-endian) windows machine.
Not sure if it's the same issue, but notably, my file also contains some definitions that identify it as a windows instead of a linux build (
SDL_SENSOR_WINDOWS
, missing theSDL_HAPTIC_LINUX
constant from master).This is despite the
-target x86_64-linux-gnu
flag given to thezig translate-c
invocation ingen_sdl.sh
. So is that being ignored, or overruled in some strange way?The text was updated successfully, but these errors were encountered: