From 9bb9aea52fcd065c1f66212d9e5685b8fa255052 Mon Sep 17 00:00:00 2001 From: Charles Dang Date: Thu, 15 Jun 2017 11:36:55 +1100 Subject: [PATCH] GUI2/Canvas: fixed mirrored images being flipped on the wrong axis. --- src/gui/core/canvas.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/core/canvas.cpp b/src/gui/core/canvas.cpp index 6fd4d202c93a1..af1c6bc65faa5 100644 --- a/src/gui/core/canvas.cpp +++ b/src/gui/core/canvas.cpp @@ -1180,7 +1180,8 @@ void image_shape::draw( surf = image_; } - const bool flip_v = vertical_mirror_(local_variables); + // Flip on the vertical axis - ie, a horizontal flip. + const bool mirror = vertical_mirror_(local_variables); #ifdef SW_RENDERING_LEGACY_MODE /* HACK: not sure why, but SW rendering has some problems with copying the surface to the texture and @@ -1200,7 +1201,7 @@ void image_shape::draw( */ texture txt(surf); - CVideo::get_singleton().render_copy(txt, nullptr, &dst_clip, false, flip_v); + CVideo::get_singleton().render_copy(txt, nullptr, &dst_clip, mirror, false); } image_shape::resize_mode image_shape::get_resize_mode(const std::string& resize_mode)