VideoRec: Replace "File of" syntax to make Pas2C happy
authorWuzzy <Wuzzy2@mail.ru>
Sun, 05 May 2019 02:04:12 +0200
changeset 14879 002f7d41f5ce
parent 14878 4e3d81af71bf
child 14880 175c96e60279
VideoRec: Replace "File of" syntax to make Pas2C happy
hedgewars/uVideoRec.pas
--- a/hedgewars/uVideoRec.pas	Sat May 04 21:37:22 2019 +0200
+++ b/hedgewars/uVideoRec.pas	Sun May 05 02:04:12 2019 +0200
@@ -68,7 +68,7 @@
               end;
 
 var RGB_Buffer: PByte;
-    cameraFile: File of TFrame;
+    cameraFile: File;
     audioFile: File;
     numPixels: LongWord;
     startTime, numFrames, curTime, progress, maxProgress: LongWord;
@@ -85,7 +85,7 @@
     // open file with prerecorded camera positions
     filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.txtin';
     Assign(cameraFile, filename);
-    Reset(cameraFile);
+    Reset(cameraFile, SizeOf(TFrame));
     maxProgress:= FileSize(cameraFile);
     if IOResult <> 0 then
     begin
@@ -314,7 +314,7 @@
     // create file with camera positions
     filename:= UserPathPrefix + '/VideoTemp/' + RecPrefix + '.txtout';
     Assign(cameraFile, filename);
-    Rewrite(cameraFile);
+    Rewrite(cameraFile, SizeOf(TFrame));
     if IOResult <> 0 then
         begin
         AddFileLog('Error: Could not write to ' + filename);