diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-08-09 19:00:49 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-08-09 19:00:52 +0200 |
commit | 18048b410e2544a22ff923892d0c934b50905557 (patch) | |
tree | 1702edf089fe1353389784942352aee59c5a9337 | |
parent | a1c429ca4de1d0a042889a491b17dab6e66429db (diff) |
Sleep video player
-rw-r--r-- | src/QuickMedia.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 10d2280..a7dc7ff 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -523,8 +523,10 @@ namespace QuickMedia { } if(video_player_ui_window) { - if(!ui_visible) + if(!ui_visible) { + std::this_thread::sleep_for(std::chrono::milliseconds(50)); continue; + } if(ui_hide_timer.getElapsedTime().asMilliseconds() > UI_HIDE_TIMEOUT) { ui_visible = false; @@ -550,6 +552,8 @@ namespace QuickMedia { video_player->set_progress((double)mouse_pos.x / (double)window_size.x); } } + } else { + std::this_thread::sleep_for(std::chrono::milliseconds(50)); } } |