hedgewars/hwengine.pas
changeset 5670 e01f0b6f1969
parent 5662 99083392cd4f
child 5672 34bb680476d4
--- a/hedgewars/hwengine.pas	Tue Aug 23 10:19:33 2011 +0200
+++ b/hedgewars/hwengine.pas	Tue Aug 23 12:53:47 2011 +0200
@@ -175,6 +175,15 @@
                         if prevFocusState xor cHasFocus then
                             onFocusStateChanged()
                         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;
+                    ParseCommand('fullscr '+intToStr(LongInt(cFullScreen)), true);
+                    WriteLnToConsole('window resize');
+                    end;
 {$ENDIF}
                 SDL_JOYAXISMOTION: ControllerAxisEvent(event.jaxis.which, event.jaxis.axis, event.jaxis.value);
                 SDL_JOYHATMOTION: ControllerHatEvent(event.jhat.which, event.jhat.hat, event.jhat.value);