-
Notifications
You must be signed in to change notification settings - Fork 491
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
How to convert *mut sdl2_sys::SDL_Event
into sdl2::event::Event
?
#1023
Comments
I don't think there is a way yet -- sdl2 is supposed to work with itself first, compatibility with sdl2-sys is a second tier citizen. I think making "from_ll" public in that case can be a good option, there are already other places in the code where it's public because of that. |
#1070 introduced a safe wrapper for |
I have a use case where I get a raw Does anything speak against making the function |
@Gosuo create a new issue for that. There is nothing against putting Event::from_ll public if someone has a use-case for it. |
I want to receive event callbacks via
SDL_AddEventWatch
. The callback is provided with*mut sdl2_sys::SDL_Event
. I want to convert it tosdl2::event::Event
, but unfortunatelyEvent::from_ll
is a private function. Is there any other way to convert the raw pointer into Rust enum?The text was updated successfully, but these errors were encountered: