[Commits] [wesnoth/wesnoth] 4e4d7b: Rewrite the FPS cap implementation

GitHub noreply at github.com
Sat Jul 22 12:49:32 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 4e4d7b527790a6bcb083dccf4cfb22cd8d5e3a92
      https://github.com/wesnoth/wesnoth/commit/4e4d7b527790a6bcb083dccf4cfb22cd8d5e3a92
  Author: Jyrki Vesterinen <sandgtx at gmail.com>
  Date:   2017-07-22 (Sat, 22 Jul 2017)

  Changed paths:
    M changelog
    M players_changelog
    M src/commandline_options.cpp
    M src/commandline_options.hpp
    M src/display.cpp
    M src/display.hpp
    M src/game_launcher.cpp
    M src/preferences/general.cpp
    M src/preferences/general.hpp
    M src/video.cpp
    M src/video.hpp

  Log Message:
  -----------
  Rewrite the FPS cap implementation

The FPS cap, originally implemented in 2007, is very poorly done. It
doesn't take frame time variance into account, and is therefore almost
guaranteed to cause missed frames all the time. It doesn't increase timer
granularity on Windows, which causes SDL_Delay() to often take much longer
than intended. And it's hardcoded for 50 FPS, which fits poorly with 60 Hz
displays.

This new implementation fixes all those issues.

My experience is that the game feels much, much smoother with the new
implementation, perfectly competitive with 1.12. In my opinion, performance
is now at an acceptable level for a stable release.





More information about the Commits mailing list