diff options
author | dec05eba <dec05eba@protonmail.com> | 2019-10-16 22:57:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2019-10-16 22:57:54 +0200 |
commit | 41fd233b903587f5c643595d0497e87546ba54de (patch) | |
tree | 7c8f12e14681567cfcc1c935c56786911d8f9faf /src | |
parent | 56acc142c6ef9a65147acdea6737acbfaeb7eca4 (diff) |
Set fps to 4 when viewing manga
Diffstat (limited to 'src')
-rw-r--r-- | src/QuickMedia.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
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(); } |