diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-02-12 23:42:11 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-02-12 23:42:11 +0100 |
commit | a40139bef6e41ed940e41bc0a802bb7ff3154d12 (patch) | |
tree | a1698e5c29799c4bbfbff715473c981e836059ed /src | |
parent | 30ada00ab85a3b9ee770dcc4ae878f3151b81487 (diff) |
Do not display window if not needed for images
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 5ef47a7..6eb81c7 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -2365,9 +2365,11 @@ namespace QuickMedia { auto text_bounds = chapter_text.getLocalBounds(); chapter_text.setPosition(std::floor(window_size.x * 0.5f - text_bounds.width * 0.5f), std::floor(window_size.y - background_height * 0.5f - font_height * 0.5f)); window.draw(chapter_text); - } - window.display(); + window.display(); + } else { + std::this_thread::sleep_for(std::chrono::milliseconds(50)); + } } end_of_images_page: |