aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2019-08-09 23:13:58 +0200
committerdec05eba <dec05eba@protonmail.com>2019-08-09 23:14:01 +0200
commitcdc1aaaf0da4534a106e6e56f0fb8c943f44cdc0 (patch)
treee7fc4873958f83fbb393d8c54b3ac2979a98c7d3 /src
parent50aed9b8cc8b706fb73a1290c45ed6e34ac52ce9 (diff)
Set video player ui vsync, to change cpu usage from 20% to 1%
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp1
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