emoon / rust_minifb

Cross platfrom window and framebuffer crate for Rust
MIT License
1.02k stars 97 forks source link

Improved smoothness of updating the window #344

Closed StefanoIncardone closed 8 months ago

StefanoIncardone commented 8 months ago

Calling the update_rate method after updating the window while a target fps has previously been set improves the smoothness and the consistency of the time it takes to update the window. Previously the window would sleep untill the target update rate was met and then perform the update, potentially going over the limit. Now the update of the window is processed before waiting, which sleeps for a more accurate amount of time.

Fixed error in documentation of set_target_fps.