mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Get size only when necessary
This commit is contained in:
parent
4a21224de5
commit
190147015d
@ -990,9 +990,6 @@ CPixmap::FromDisplayToGame (Sint32 & x, Sint32 & y, double prevScale)
|
||||
void
|
||||
CPixmap::FromGameToDisplay (Sint32 & x, Sint32 & y)
|
||||
{
|
||||
Sint32 w, h;
|
||||
SDL_GetWindowSize (g_window, &w, &h);
|
||||
|
||||
double factor = 1;
|
||||
|
||||
if (!g_bFullScreen)
|
||||
@ -1004,6 +1001,9 @@ CPixmap::FromGameToDisplay (Sint32 & x, Sint32 & y)
|
||||
if (!g_bFullScreen)
|
||||
return;
|
||||
|
||||
Sint32 w, h;
|
||||
SDL_GetWindowSize (g_window, &w, &h);
|
||||
|
||||
double _w = w, _h = h;
|
||||
|
||||
x = x * _w / LXIMAGE ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user