From 92a98c6525d42a967d66492ef7bd61c4a1d7edd1 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 5 Aug 2019 21:15:37 +0200 Subject: Dont use subpixel positions, it will make things blurry --- src/QuickMedia.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/QuickMedia.cpp') diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp index a867255..5ea2c43 100644 --- a/src/QuickMedia.cpp +++ b/src/QuickMedia.cpp @@ -7,6 +7,7 @@ #include #include #include +#include const sf::Color front_color(43, 45, 47); const sf::Color back_color(33, 35, 37); @@ -421,7 +422,7 @@ namespace QuickMedia { auto image_size = sf::Vector2f(texture_size.x, texture_size.y); image_size.x *= image_scale.x; image_size.y *= image_scale.y; - image.setPosition(window_size.x * 0.5f - image_size.x * 0.5f, window_size.y * 0.5f - image_size.y * 0.5f); + image.setPosition(std::floor(window_size.x * 0.5f - image_size.x * 0.5f), std::floor(window_size.y * 0.5f - image_size.y * 0.5f)); } } -- cgit v1.2.3