- Init physfs before creating debug log
- Remove addfilelog calls from physfs init code
--- 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
--- 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