hedgewars/uVideoRec.pas
changeset 7386 e82a076df09b
parent 7379 aa29a2f16cc7
child 7392 bc3306c59a08
--- a/hedgewars/uVideoRec.pas	Tue Jul 10 21:56:25 2012 +0400
+++ b/hedgewars/uVideoRec.pas	Tue Jul 10 21:58:19 2012 +0400
@@ -246,12 +246,7 @@
 begin
     thumbpath:= '/VideoTemp/' + RecPrefix;
     AddFileLog('Saving thumbnail ' + thumbpath);
-    if cScreenWidth > cScreenHeight then
-        k:= cScreenWidth div 400  // here 400 is minimum size of thumbnail
-    else
-        k:= cScreenHeight div 400;
-    if k = 0 then
-        k:= 1;
+    k:= max(max(cScreenWidth, cScreenHeight) div 400, 1); // here 400 is minimum size of thumbnail
     MakeScreenshot(thumbpath, k);
     thumbnailSaved:= true;
 end;
@@ -264,7 +259,7 @@
     AddFileLog('BeginPreRecording');
 
     thumbnailSaved:= false;
-    RecPrefix:= FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks);
+    RecPrefix:= 'hw-' + FormatDateTime('YYYY-MM-DD_HH-mm-ss-z', Now());
 
     Mix_QuerySpec(@frequency, @format, @channels);
     AddFileLog('sound: frequency = ' + IntToStr(frequency) + ', format = ' + IntToStr(format) + ', channels = ' + IntToStr(channels));