Use frontend value for fullscreening.
authornemo
Fri, 26 Aug 2011 16:16:27 -0400
changeset 5686 3f2e6ec7719a
parent 5685 f5518fbcd019
child 5687 fac606654317
Use frontend value for fullscreening.
hedgewars/hwengine.pas
hedgewars/uStore.pas
hedgewars/uVariables.pas
--- a/hedgewars/hwengine.pas	Thu Aug 25 16:17:15 2011 -0400
+++ b/hedgewars/hwengine.pas	Fri Aug 26 16:16:27 2011 -0400
@@ -242,6 +242,8 @@
 {$ENDIF}
     cMinScreenWidth:= cScreenWidth;
     cMinScreenHeight:= cScreenHeight;
+    cOrigScreenWidth:= cScreenWidth;
+    cOrigScreenHeight:= cScreenHeight;
     if 480 < cMinScreenWidth then cMinScreenWidth:= 480;
     if 320 < cMinScreenHeight then cMinScreenHeight:= 320;
 
--- a/hedgewars/uStore.pas	Thu Aug 25 16:17:15 2011 -0400
+++ b/hedgewars/uStore.pas	Fri Aug 26 16:16:27 2011 -0400
@@ -1006,7 +1006,8 @@
     flags:= flags or SDL_WINDOW_BORDERLESS or SDL_WINDOW_RESIZABLE;
 {$ENDIF}
 
-    SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags);
+    if cFullScreen then SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cOrigScreenWidth, cOrigScreenHeight, flags);
+    else SDLwindow:= SDL_CreateWindow('Hedgewars', x, y, cScreenWidth, cScreenHeight, flags);
     SDLTry(SDLwindow <> nil, true);
 {$ELSE}
     flags:= SDL_OPENGL or SDL_RESIZABLE;
--- a/hedgewars/uVariables.pas	Thu Aug 25 16:17:15 2011 -0400
+++ b/hedgewars/uVariables.pas	Fri Aug 26 16:16:27 2011 -0400
@@ -25,10 +25,12 @@
 
 var
 /////// init flags ///////
-    cMinScreenWidth  : LongInt     = 480;
-    cMinScreenHeight : LongInt     = 320;
-    cScreenWidth    : LongInt     = 1024;
-    cScreenHeight   : LongInt     = 768;
+    cMinScreenWidth   : LongInt     = 480;
+    cMinScreenHeight  : LongInt     = 320;
+    cScreenWidth      : LongInt     = 1024;
+    cScreenHeight     : LongInt     = 768;
+    cOrigScreenWidth  : LongInt     = 1024;
+    cOrigScreenHeight : LongInt     = 768;
     cBits           : LongInt     = 32;
     ipcPort         : Word        = 0;
     cFullScreen     : boolean     = false;