hedgewars/hwengine.pas
changeset 6021 652a199d4f38
parent 6019 8843ea756cfc
child 6023 a28be05b20bc
child 6072 e3dc802965d6
--- a/hedgewars/hwengine.pas	Sun Sep 25 02:28:33 2011 +0200
+++ b/hedgewars/hwengine.pas	Sun Sep 25 03:32:07 2011 +0200
@@ -188,6 +188,12 @@
                     else if event.window.event = SDL_WINDOWEVENT_RESTORED then
                         begin
                         GameState:= previousGameState;
+                        end
+                    else if event.window.event = SDL_WINDOWEVENT_RESIZED then
+                        begin
+                        cNewScreenWidth:= max(2 * (event.window.data1 div 2), cMinScreenWidth);
+                        cNewScreenHeight:= max(2 * (event.window.data2 div 2), cMinScreenHeight);
+                        cScreenResizeDelay:= RealTicks+500;
                         end;
 {$ELSE}
                     KeyPressChat(event.key.keysym.unicode);