Skip to content

Update to SDL 2.0.18 #1181

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

Open
FrenchDilettante opened this issue Dec 16, 2021 · 3 comments
Open

Update to SDL 2.0.18 #1181

FrenchDilettante opened this issue Dec 16, 2021 · 3 comments

Comments

@FrenchDilettante
Copy link

Hi,

SDL 2.0.18 has been published and includes a handful of extremely useful new methods, which I would love to use in my Rust program.

What's the procedure to update the SDL2 bindings in sdl2_sys? I'd be happy to open a PR for that if you wish!

@Cobrand
Copy link
Member

Cobrand commented Dec 18, 2021

It's not perfect but you compile rust-sdl2 using use-bindgen (make sure your local SDL2 is 2.0.18), an then copy sdl_binding.rs from target/sdl2-sys-xxxxx/sdl_bindings.rs to sdl2-sys/sdl-bindings.rs

That should do the trick

@tasogare3710
Copy link

I generated sdl_bindings.rs for SDL 2.0.18 using the use-bindgen feature and the SDL2_INCLUDE_PATH environment variable, but a compilation error occurred. It seems to be the same problem as rust-lang/rust-bindgen#1556, but the directly cause seems to be not specifying the proper whitelist.

I added only the necessary api's published by SDL2 to the whitelist, and the compilation was successful. This issue is mentioned in #1059 (comment) § Build issues with bindgen.

@alula
Copy link

alula commented Feb 10, 2022

Since 2.0.18 is in bundled master, can embedded sdl_bindings.rs be updated to 2.0.18?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants