diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-09 23:13:58 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-09 23:14:01 +0200 |
commit | cdc1aaaf0da4534a106e6e56f0fb8c943f44cdc0 (patch) | |
tree | e7fc4873958f83fbb393d8c54b3ac2979a98c7d3 | |
parent | 50aed9b8cc8b706fb73a1290c45ed6e34ac52ce9 (diff) |
Set video player ui vsync, to change cpu usage from 20% to 1%
-rw-r--r-- | src/QuickMedia.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index a57c522..ba9abf7 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -388,6 +388,7 @@ namespace QuickMedia { XFlush(disp); video_player_ui_window = std::make_unique<sf::RenderWindow>(ui_window); + video_player_ui_window->setVerticalSyncEnabled(true); }; // This variable is needed because calling play_video is not possible in onPlaybackEndedCallback |