# HG changeset patch # User nemo # Date 1314105165 14400 # Node ID 34bb680476d4c105d9c50e331fec584bd18d72d4 # Parent e01f0b6f1969fb1154fcd1ddc084e77a082b11fa don't override user defined size when resizing diff -r e01f0b6f1969 -r 34bb680476d4 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Tue Aug 23 12:53:47 2011 +0200 +++ b/hedgewars/hwengine.pas Tue Aug 23 09:12:45 2011 -0400 @@ -177,10 +177,10 @@ end; SDL_VIDEORESIZE: begin // using lower values causes widget overlap and video issues - if event.resize.w > 768 then cScreenWidth:= event.resize.w - else cScreenWidth:= 768; - if event.resize.h > 576 then cScreenHeight:= event.resize.h - else cScreenHeight:= 576; + if event.resize.w > cMinScreenWidth then cScreenWidth:= event.resize.w + else cScreenWidth:= cMinScreenWidth; + if event.resize.h > cMinScreenHeight then cScreenHeight:= event.resize.h + else cScreenHeight:= cMinScreenHeight; ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true); WriteLnToConsole('window resize'); end; @@ -239,6 +239,10 @@ recordFileName:= gameArgs[10]; cStereoMode:= smNone; {$ENDIF} + cMinScreenWidth:= cScreenWidth; + cMinScreenHeight:= cScreenHeight; + if 768 < cMinScreenWidth then cMinScreenWidth:= 768; + if 576 < cMinScreenHeight then cMinScreenHeight:= 576; initEverything(true); diff -r e01f0b6f1969 -r 34bb680476d4 hedgewars/uVariables.pas --- a/hedgewars/uVariables.pas Tue Aug 23 12:53:47 2011 +0200 +++ b/hedgewars/uVariables.pas Tue Aug 23 09:12:45 2011 -0400 @@ -25,6 +25,8 @@ var /////// init flags /////// + cMinScreenWidth : LongInt = 768; + cMinScreenHeight : LongInt = 576; cScreenWidth : LongInt = 1024; cScreenHeight : LongInt = 768; cBits : LongInt = 32;