diff options
author | basisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-10-19 16:10:50 +0000 |
---|---|---|
committer | basisbit <basisbit@b956fd51-792f-4845-bead-9b4dfca2ff2c> | 2015-10-19 16:10:50 +0000 |
commit | b4f5555b3f7319e9d9e712345f577411b0f5fd34 (patch) | |
tree | 902e7d4a641b2bd6e4aa911a18bc321a88b19c58 /src | |
parent | a56d5512fdfa81f71acbe6c41af379c5b2827a3c (diff) | |
download | usdx-b4f5555b3f7319e9d9e712345f577411b0f5fd34.tar.gz usdx-b4f5555b3f7319e9d9e712345f577411b0f5fd34.tar.xz usdx-b4f5555b3f7319e9d9e712345f577411b0f5fd34.zip |
* 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
Diffstat (limited to 'src')
-rw-r--r-- | src/base/UMain.pas | 15 |
1 files 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 |