hedgewars/hwengine.pas
branchqmlfrontend
changeset 12888 adb1fccc706a
parent 12881 b544bbbd0696
--- a/hedgewars/hwengine.pas	Sat Jan 06 03:17:12 2018 +0100
+++ b/hedgewars/hwengine.pas	Sun Jan 07 01:21:42 2018 +0100
@@ -37,6 +37,7 @@
 
 function  RunEngine(argc: LongInt; argv: PPChar): Longint; cdecl; export;
 function GameTick(delta: Longword): boolean; cdecl; export;
+procedure ResizeWindow(width, height: Longword); cdecl; export;
 
 procedure preInitEverything();
 procedure initEverything(complete:boolean);
@@ -654,4 +655,11 @@
     end;
 end;
 
+procedure ResizeWindow(width, height: Longword); cdecl; export;
+begin
+    cNewScreenWidth:= max(2 * (width div 2), cMinScreenWidth);
+    cNewScreenHeight:= max(2 * (height div 2), cMinScreenHeight);
+    cScreenResizeDelay:= RealTicks + 500{$IFDEF IPHONEOS}div 2{$ENDIF};
+end;
+
 end.