1
0
mirror of https://github.com/blupi-games/planetblupi synced 2024-12-30 10:15:36 +01:00

Set the logical size only at the init

This commit is contained in:
Mathieu Schroeter 2017-03-03 21:51:14 +01:00
parent b0a3e7875d
commit 5ca80681a9
2 changed files with 2 additions and 5 deletions

View File

@ -431,6 +431,8 @@ static bool DoInit (Sint32 argc, char *argv[])
if (!bOK) // config.ini pas correct ?
return InitFail ("Game not correctly installed", false);
SDL_RenderSetLogicalSize (g_renderer, LXIMAGE, LYIMAGE);
const auto renders = SDL_GetNumRenderDrivers ();
for (int i = 0; i < renders; ++i)
{

View File

@ -1635,11 +1635,6 @@ void CEvent::SetWindowSize (Uint8 prevScale, Uint8 newScale)
SDL_SetWindowPosition (g_window,
SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED);
if (newScale == 1)
SDL_RenderSetLogicalSize (g_renderer, 0, 0);
else
SDL_RenderSetLogicalSize (g_renderer, LXIMAGE, LYIMAGE);
m_pPixmap->ReloadTargetTextures ();
/* Force this update before otherwise the coordinates retrieved with