# HG changeset patch # User unc0rr # Date 1459629177 -10800 # Node ID f17df78181d8ba44a4bae1b02e7cf797e2f36d86 # Parent 3bff941c035f387f91652421863451d982f5b5fb - Init physfs before creating debug log - Remove addfilelog calls from physfs init code diff -r 3bff941c035f -r f17df78181d8 hedgewars/hwengine.pas --- a/hedgewars/hwengine.pas Sat Apr 02 10:45:33 2016 +0300 +++ b/hedgewars/hwengine.pas Sat Apr 02 23:32:57 2016 +0300 @@ -457,6 +457,12 @@ procedure initEverything (complete:boolean); begin + PathPrefix:= PathPrefix + #0; + UserPathPrefix:= UserPathPrefix + #0; + uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]); + PathPrefix:= copy(PathPrefix, 1, length(PathPrefix) - 1); + UserPathPrefix:= copy(UserPathPrefix, 1, length(UserPathPrefix) - 1); + uUtils.initModule(complete); // opens the debug file, must be the first uVariables.initModule; // inits all global variables uCommands.initModule; // helps below @@ -466,12 +472,6 @@ uLandPainted.initModule; // computes drawn land uIO.initModule; // sets up sockets - PathPrefix:= PathPrefix + #0; - UserPathPrefix:= UserPathPrefix + #0; - uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]); - PathPrefix:= copy(PathPrefix, 1, length(PathPrefix) - 1); - UserPathPrefix:= copy(UserPathPrefix, 1, length(UserPathPrefix) - 1); - uScript.initModule; if complete then diff -r 3bff941c035f -r f17df78181d8 hedgewars/uPhysFSLayer.pas --- a/hedgewars/uPhysFSLayer.pas Sat Apr 02 10:45:33 2016 +0300 +++ b/hedgewars/uPhysFSLayer.pas Sat Apr 02 23:32:57 2016 +0300 @@ -181,10 +181,7 @@ procedure pfsMount(path: PChar; mountpoint: PChar); begin - if PHYSFS_mount(path, mountpoint, false) then - AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : ok') - else - AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : FAILED ("' + shortstring(PHYSFS_getLastError()) + '")'); + PHYSFS_mount(path, mountpoint, false) end; procedure pfsMountAtRoot(path: PChar); @@ -207,7 +204,7 @@ {$ENDIF} i:= PHYSFS_init(Str2PChar(cPhysfsId)); - AddFileLog('[PhysFS] init: ' + inttostr(i)); + //AddFileLog('[PhysFS] init: ' + inttostr(i)); {$IFNDEF MOBILE} // mount system fonts paths first