brson / rust-sdl

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

No binding for SDL_Delay #124

Closed FreeFull closed 10 years ago

FreeFull commented 10 years ago

Having SDL_Delay would be useful for certain kinds of programs, and the binding wouldn't be difficult to add to the library. The only difficulty is figuring out where exactly it would belong.

lifthrasiir commented 10 years ago

I actually think that you should use std::io::timer::sleep instead, which is same to SDL_Delay but possibly less confusing than that (since it can block the whole green scheduler in conjunction to libgreen, though I think SDL doesn't work well with libgreen anyway). Would there be other reasons to add SDL_Delay?

FreeFull commented 10 years ago

If using the delay from the std is better, there isn't really any reason to add an SDL_Delay binding. Maybe a wrapper around std::io::timer::sleep could be added for those used to writing C code with SDL, but that's not necessary.