Open gregbuchholz opened 2 years ago
It's not defined in sdl_bindings.rs because it's generated via bindgen, which doesn't seem to support it yet: https://github.com/rust-lang/rust-bindgen/issues/316
A solution can be to manually define pub const
which those hardcoded values in rust-sdl2 itself (and not using bindgen for this one).
Ah, good find. The exact same issue in this comment on that thread. Seems like a minor enough issue that it wouldn't be worth breaking the automated build. Easy enough to define in my program. For future searchers on this topic:
const SDL_TOUCH_MOUSEID:u32 = u32::MAX;
I'm not seeing "SDL_TOUCH_MOUSEID" in the Rust bindings. Am I overlooking something? The
#define
comes from C source at "./include/SDL_touch.h", and is used to differentiate between simulated mouse events and touch events on touch enabled devices.See also: https://wiki.libsdl.org/SDL_MouseMotionEvent for more context. I'm not quite following how "sdl2-sys/sdl_bindings.rs" is generated (from "sdl2-sys/build.rs"?), or why it would be missing.