From 41fd233b903587f5c643595d0497e87546ba54de Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 16 Oct 2019 22:57:52 +0200 Subject: Set fps to 4 when viewing manga --- src/QuickMedia.cpp | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index 6ac47bf..21d996d 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -1103,25 +1103,23 @@ namespace QuickMedia { image_size.y *= image_scale.y; image.setPosition(std::floor(content_size.x * 0.5f - image_size.x * 0.5f), std::floor(content_size.y * 0.5f - image_size.y * 0.5f)); } - } else { - continue; - } - window.clear(back_color); + window.clear(back_color); - if(error) { - window.draw(error_message); - } else { - window.draw(image); - } + if(error) { + window.draw(error_message); + } else { + window.draw(image); + } - chapter_text_background.setSize(sf::Vector2f(window_size.x, background_height)); - chapter_text_background.setPosition(0.0f, std::floor(window_size.y - background_height)); - window.draw(chapter_text_background); + chapter_text_background.setSize(sf::Vector2f(window_size.x, background_height)); + chapter_text_background.setPosition(0.0f, std::floor(window_size.y - background_height)); + window.draw(chapter_text_background); - 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); + 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(); } -- cgit v1.2.3