hedgewars/hwengine.pas
changeset 5730 1ef0027411f4
parent 5724 3064ed85a5bd
child 5732 f3f381011728
equal deleted inserted replaced
5728:aca2acfba4ca 5730:1ef0027411f4
   179                         if prevFocusState xor cHasFocus then
   179                         if prevFocusState xor cHasFocus then
   180                             onFocusStateChanged()
   180                             onFocusStateChanged()
   181                         end;
   181                         end;
   182                 SDL_VIDEORESIZE: begin
   182                 SDL_VIDEORESIZE: begin
   183                     // using lower values causes widget overlap and video issues
   183                     // using lower values causes widget overlap and video issues
   184                     if event.resize.w > cMinScreenWidth then cScreenWidth:= event.resize.w
   184                     cScreenWidth:= max(event.resize.w, cMinScreenWidth);
   185                     else cScreenWidth:= cMinScreenWidth;
   185                     cScreenHeight:= max(event.resize.h, cMinScreenHeight);
   186                     if event.resize.h > cMinScreenHeight then cScreenHeight:= event.resize.h
   186 
   187                     else cScreenHeight:= cMinScreenHeight;
       
   188                     ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   187                     ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   189                     WriteLnToConsole('window resize');
   188                     WriteLnToConsole('window resize');
   190                     InitCameraBorders();
   189                     InitCameraBorders();
   191                     end;
   190                     end;
   192 {$ENDIF}
   191 {$ENDIF}
   242     cAltDamage:= gameArgs[8] = '1';
   241     cAltDamage:= gameArgs[8] = '1';
   243     val(gameArgs[9], rotationQt);
   242     val(gameArgs[9], rotationQt);
   244     recordFileName:= gameArgs[10];
   243     recordFileName:= gameArgs[10];
   245     cStereoMode:= smNone;
   244     cStereoMode:= smNone;
   246 {$ENDIF}
   245 {$ENDIF}
   247     cMinScreenWidth:= cScreenWidth;
   246     cMinScreenWidth:= min(cScreenWidth, 480);
   248     cMinScreenHeight:= cScreenHeight;
   247     cMinScreenHeight:= min(cScreenHeight, 320);
   249     cOrigScreenWidth:= cScreenWidth;
   248     cOrigScreenWidth:= cScreenWidth;
   250     cOrigScreenHeight:= cScreenHeight;
   249     cOrigScreenHeight:= cScreenHeight;
   251     if 480 < cMinScreenWidth then cMinScreenWidth:= 480;
       
   252     if 320 < cMinScreenHeight then cMinScreenHeight:= 320;
       
   253 
   250 
   254     initEverything(true);
   251     initEverything(true);
   255 
   252 
   256     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   253     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   257     AddFileLog('Prefix: "' + PathPrefix +'"');
   254     AddFileLog('Prefix: "' + PathPrefix +'"');