# HG changeset patch # User koda # Date 1277219427 -7200 # Node ID 03892fb97ab3776ad21d906e12cdafed67474f3d # Parent 04e2fea3e83a743163681cba932b51c73da1a8df fix build and permissions problems when launching hwengine from command line diff -r 04e2fea3e83a -r 03892fb97ab3 hedgewars/uMisc.pas --- a/hedgewars/uMisc.pas Mon Jun 21 22:45:52 2010 +0200 +++ b/hedgewars/uMisc.pas Tue Jun 22 17:10:27 2010 +0200 @@ -170,7 +170,7 @@ {$ENDIF} implementation -uses Math, uConsole, uStore, uIO, uSound, typinfo; +uses Math, uConsole, uStore, uIO, uSound, typinfo, sysutils; var KBnum: Longword; {$IFDEF DEBUGFILE} @@ -775,11 +775,11 @@ Assign(f,'../Documents/debug.txt'); Rewrite(f); {$ELSE} - if ParamStr(1) <> '' then + if (ParamStr(1) <> '') and (ParamStr(2) <> '') then begin for i:= 0 to 7 do begin - assign(f, ParamStr(1) + '/debug' + inttostr(i) + '.txt'); + assign(f, ExtractFileDir(ParamStr(2)) + '/debug' + inttostr(i) + '.txt'); rewrite(f); if IOResult = 0 then break; end; diff -r 04e2fea3e83a -r 03892fb97ab3 misc/libopenalbridge/openalbridge.h --- a/misc/libopenalbridge/openalbridge.h Mon Jun 21 22:45:52 2010 +0200 +++ b/misc/libopenalbridge/openalbridge.h Tue Jun 22 17:10:27 2010 +0200 @@ -39,7 +39,7 @@ int openal_loadfile (const char *filename); // unloads data from memory and marks a free spot - int openal_unloadfile (unsigned int index) + void openal_unloadfile (unsigned int index); /******* other functions continue in commands.h *******/