From 3834861c1e46bc2f178cb11474158860c32d727e Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Mon, 25 Jun 2018 17:43:49 +0200 Subject: [PATCH] Fix mouse wrap in fullscreen (desktop) --- src/pixmap.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pixmap.cxx b/src/pixmap.cxx index 163db6e..606782c 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -1013,12 +1013,11 @@ CPixmap::FromGameToDisplay (Sint32 & x, Sint32 & y) x *= factor; y *= factor; - if (static_cast (w) / h == static_cast (SCRNUM) / SCRDEN) + if (!g_bFullScreen) return; double _w = w, _h = h; - double ratio = w * SCRDEN / SCRNUM; - x = x * ratio / LXIMAGE + (_w - ratio) / 2; + x = x * _w / LXIMAGE; y = y * _h / LYIMAGE; }