X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame%2FDoom2DF.lpr;h=f8d946e730c74329686fae4c3cfccf10654b61ec;hb=6a529517007ed9becc3cd4e188f3c0e1348fda1b;hp=3239be1e6fd0bd800cee48c3a34d2d362f708093;hpb=b7f7681ccf7ac960f25f8cadebd6da7d109211bf;p=d2df-sdl.git diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr index 3239be1..f8d946e 100644 --- a/src/game/Doom2DF.lpr +++ b/src/game/Doom2DF.lpr @@ -172,12 +172,32 @@ begin SetEnvVar('TIMIDITY_CFG', 'timidity.cfg'); {$ENDIF ANDROID} - for f := 1 to ParamCount do + f := 1; + while f <= ParamCount do begin - if ParamStr(f) = '--gdb' then noct := true - else if ParamStr(f) = '--log' then conbufDumpToStdOut := true - else if ParamStr(f) = '--safe-log' then e_SetSafeSlowLog(true); + case ParamStr(f) of + '--gdb': noct := true; + '--log': conbufDumpToStdOut := true; + '--safe-log': e_SetSafeSlowLog(true); + '--log-file': + if f + 1 <= ParamCount then + begin + Inc(f); + LogFileName := ParamStr(f) + end; + end; + Inc(f) end; + + if LogFileName = '' then + begin +{$IFDEF HEADLESS} + LogFileName := 'Doom2DF_H.log'; +{$ELSE} + LogFileName := 'Doom2DF.log'; +{$ENDIF} + end; + if noct then begin Main()