# HG changeset patch # User Wuzzy # Date 1544733326 -3600 # Node ID 05ca0057d71f9756d757795f1a63cd9497aa68aa # Parent 6f6d9fe798303c31fc0895c232cbc8285166ab43# Parent 2c4f7177930265847c526a0f8ef263f7041db28c Merge diff -r 6f6d9fe79830 -r 05ca0057d71f hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Thu Dec 13 21:34:04 2018 +0100 +++ b/hedgewars/hwengine.pas Thu Dec 13 21:35:26 2018 +0100 @@ -140,12 +140,14 @@ if flagMakeCapture then begin flagMakeCapture:= false; - {$IFNDEF PAS2C} if flagDumpLand then s:= '/Screenshots/mapdump_' else s:= '/Screenshots/hw_'; + {$IFDEF PAS2C} s:= s + inttostr(GameTicks); + {$ELSE} s:= s + FormatDateTime('YYYY-MM-DD_HH-mm-ss', Now()) + inttostr(GameTicks); + {$ENDIF} // flash playSound(sndShutter); @@ -161,7 +163,6 @@ WriteLnToConsole('Screenshot failed.'); AddChatString(#5 + 'screen capture failed (lack of memory or write permissions)'); end - {$ENDIF} end; end; diff -r 6f6d9fe79830 -r 05ca0057d71f project_files/hwc/rtl/fileio.c --- a/project_files/hwc/rtl/fileio.c Thu Dec 13 21:34:04 2018 +0100 +++ b/project_files/hwc/rtl/fileio.c Thu Dec 13 21:35:26 2018 +0100 @@ -186,7 +186,8 @@ */ void fpcrtl_blockWrite__vars(File f, const void *buf, Integer count, Integer *result) { - assert(0); + assert(f->record_len > 0); + *result = fwrite(buf, f->record_len, count, f->fp); } bool fpcrtl_directoryExists(string255 dir) {