Fix bug 656 by using the right resolution values
authorkoda
Tue, 15 Oct 2013 01:15:39 +0200
changeset 9543 1826b5315369
parent 9541 312bb4384f33
child 9545 f7a55d8e8f4d
Fix bug #656 by using the right resolution values
hedgewars/hwengine.pas
hedgewars/uVideoRec.pas
--- a/hedgewars/hwengine.pas	Mon Oct 14 23:57:31 2013 +0400
+++ b/hedgewars/hwengine.pas	Tue Oct 15 01:15:39 2013 +0200
@@ -444,7 +444,7 @@
         uTextures.initModule;
 {$IFDEF ANDROID}GLUnit.initModule;{$ENDIF}
 {$IFDEF USE_TOUCH_INTERFACE}uTouch.initModule;{$ENDIF}
-{$IFDEF USE_VIDEO_RECORDING}uVideoRec.initModule;{$ENDIF}   //stub
+{$IFDEF USE_VIDEO_RECORDING}uVideoRec.initModule;{$ENDIF}
         uAI.initModule;
         uAIMisc.initModule;
         uAILandMarks.initModule;    //stub
--- a/hedgewars/uVideoRec.pas	Mon Oct 14 23:57:31 2013 +0400
+++ b/hedgewars/uVideoRec.pas	Tue Oct 15 01:15:39 2013 +0200
@@ -367,6 +367,10 @@
 
 procedure initModule;
 begin
+    // we need to make sure these variables are initialized before the main loop
+    // or the wrapper will keep the default values of preinit
+    cScreenWidth:= min(cWindowedWidth, 640);
+    cScreenHeight:= min(cWindowedHeight, 480);
 end;
 
 procedure freeModule;