mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
Fix mouse pos when zoom=2 > fullscreen
This commit is contained in:
parent
375388b22f
commit
3ebe028640
@ -1721,11 +1721,11 @@ CEvent::GetMousePos ()
|
||||
// Initialise le mode full screen ou non.
|
||||
|
||||
void
|
||||
CEvent::SetFullScreen (bool bFullScreen)
|
||||
CEvent::SetFullScreen (bool bFullScreen, double prevScale)
|
||||
{
|
||||
int x, y;
|
||||
SDL_GetMouseState (&x, &y);
|
||||
this->m_pPixmap->FromDisplayToGame (x, y);
|
||||
this->m_pPixmap->FromDisplayToGame (x, y, prevScale);
|
||||
|
||||
g_bFullScreen = bFullScreen;
|
||||
|
||||
@ -4248,8 +4248,7 @@ CEvent::ChangeButtons (Sint32 message)
|
||||
{
|
||||
auto zoom = g_zoom;
|
||||
g_zoom = 1;
|
||||
SetFullScreen (true);
|
||||
SetWindowSize (zoom, 1);
|
||||
SetFullScreen (true, zoom);
|
||||
break;
|
||||
}
|
||||
case EV_BUTTON4:
|
||||
|
@ -98,7 +98,7 @@ public:
|
||||
Point GetMousePos ();
|
||||
void
|
||||
Create (CPixmap * pPixmap, CDecor * pDecor, CSound * pSound, CMovie * pMovie);
|
||||
void SetFullScreen (bool bFullScreen);
|
||||
void SetFullScreen (bool bFullScreen, double prevScale = 1);
|
||||
Sint32 GetWorld ();
|
||||
Sint32 GetPhysicalWorld ();
|
||||
Sint32 GetImageWorld ();
|
||||
|
Loading…
x
Reference in New Issue
Block a user