mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Fix mouse wrap in fullscreen (desktop)
This commit is contained in:
parent
589b720474
commit
3834861c1e
@ -1013,12 +1013,11 @@ CPixmap::FromGameToDisplay (Sint32 & x, Sint32 & y)
|
||||
x *= factor;
|
||||
y *= factor;
|
||||
|
||||
if (static_cast<double> (w) / h == static_cast<double> (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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user