hedgewars/hwengine.pas
changeset 5672 34bb680476d4
parent 5670 e01f0b6f1969
child 5674 244cbc1448bd
equal deleted inserted replaced
5670:e01f0b6f1969 5672:34bb680476d4
   175                         if prevFocusState xor cHasFocus then
   175                         if prevFocusState xor cHasFocus then
   176                             onFocusStateChanged()
   176                             onFocusStateChanged()
   177                         end;
   177                         end;
   178                 SDL_VIDEORESIZE: begin
   178                 SDL_VIDEORESIZE: begin
   179                     // using lower values causes widget overlap and video issues
   179                     // using lower values causes widget overlap and video issues
   180                     if event.resize.w > 768 then cScreenWidth:= event.resize.w
   180                     if event.resize.w > cMinScreenWidth then cScreenWidth:= event.resize.w
   181                     else cScreenWidth:= 768;
   181                     else cScreenWidth:= cMinScreenWidth;
   182                     if event.resize.h > 576 then cScreenHeight:= event.resize.h
   182                     if event.resize.h > cMinScreenHeight then cScreenHeight:= event.resize.h
   183                     else cScreenHeight:= 576;
   183                     else cScreenHeight:= cMinScreenHeight;
   184                     ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   184                     ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
   185                     WriteLnToConsole('window resize');
   185                     WriteLnToConsole('window resize');
   186                     end;
   186                     end;
   187 {$ENDIF}
   187 {$ENDIF}
   188                 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
   188                 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
   237     cAltDamage:= gameArgs[8] = '1';
   237     cAltDamage:= gameArgs[8] = '1';
   238     val(gameArgs[9], rotationQt);
   238     val(gameArgs[9], rotationQt);
   239     recordFileName:= gameArgs[10];
   239     recordFileName:= gameArgs[10];
   240     cStereoMode:= smNone;
   240     cStereoMode:= smNone;
   241 {$ENDIF}
   241 {$ENDIF}
       
   242     cMinScreenWidth:= cScreenWidth;
       
   243     cMinScreenHeight:= cScreenHeight;
       
   244     if 768 < cMinScreenWidth then cMinScreenWidth:= 768;
       
   245     if 576 < cMinScreenHeight then cMinScreenHeight:= 576;
   242 
   246 
   243     initEverything(true);
   247     initEverything(true);
   244 
   248 
   245     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   249     WriteLnToConsole('Hedgewars ' + cVersionString + ' engine (network protocol: ' + inttostr(cNetProtoVersion) + ')');
   246     AddFileLog('Prefix: "' + PathPrefix +'"');
   250     AddFileLog('Prefix: "' + PathPrefix +'"');