From b4f5555b3f7319e9d9e712345f577411b0f5fd34 Mon Sep 17 00:00:00 2001 From: basisbit Date: Mon, 19 Oct 2015 16:10:50 +0000 Subject: * the updated SDL library supports resizing without loosing all texture data, so activate that on windows. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@3148 b956fd51-792f-4845-bead-9b4dfca2ff2c --- src/base/UMain.pas | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/base/UMain.pas b/src/base/UMain.pas index a84694ba..f0dc3d4e 100644 --- a/src/base/UMain.pas +++ b/src/base/UMain.pas @@ -422,15 +422,18 @@ begin // Important: Unless SDL_SetVideoMode() is called (it is not on Windows), Screen.w // and Screen.h are not valid after a resize and still contain the old size. Use // ScreenW and ScreenH instead. - {$IF Defined(Linux) or Defined(FreeBSD)} + ////// if boolean( Ini.FullScreen ) then - SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_FULLSCREEN) + begin + {$IF Defined(Linux) or Defined(FreeBSD)} + SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_FULLSCREEN); + {$ELSE} + Screen.W := ScreenW; + Screen.H := ScreenH; + {$IFEND} + end else SDL_SetVideoMode(ScreenW, ScreenH, (Ini.Depth+1) * 16, SDL_OPENGL or SDL_RESIZABLE); - {$ELSE} - Screen.W := ScreenW; - Screen.H := ScreenH; - {$IFEND} end; SDL_KEYDOWN: begin -- cgit v1.2.3