Not-Nik / raylib-zig

Manually tweaked, auto-generated raylib bindings for zig. https://github.com/raysan5/raylib
MIT License
703 stars 123 forks source link

fix setMouseCursor() and setTextureWrap() enum types #126

Closed pancelor closed 4 months ago

pancelor commented 4 months ago

The main change here is

- pub fn setMouseCursor(cursor: i32) void {
-     cdef.SetMouseCursor(@as(c_int, cursor));
+ pub fn setMouseCursor(cursor: MouseCursor) void {
+    cdef.SetMouseCursor(cursor);
}

and similar for setTextureWrap(). These are bugfixes, due to typos in generate_functions.py

There's some other tidying I did as well. In particular, I overhauled fix_enums() to hopefully make it easier to avoid these sorts of problems in the future. It makes the logic a bit more abstract -- for good reason IMO, but let me know if you don't want it.