brson / rust-sdl

SDL bindings for Rust
MIT License
179 stars 52 forks source link

Handle SDL errors and fix segfaults #159

Closed lgrz closed 9 years ago

lgrz commented 9 years ago

Submitting this one as a PR, it includes breaking changes to the existing API:

get_drive_name and get_joystick_name may call SDL_SetError so the return type of these functions was changed from String to Restult<String, String>.

If there is anything wrong with these changes or if you have better suggestions, let me know.

lgrz commented 9 years ago

Ok I'll merge this one in. It turns out the latest changes 3bb9ef6c fix the segfault with get_key_name so that has been removed.