hedgewars/uPhysFSLayer.pas
changeset 11631 b3db79b56f28
parent 11155 a10143c3d87d
child 11632 cac74d9075be
--- a/hedgewars/uPhysFSLayer.pas	Tue Mar 29 16:54:07 2016 +0200
+++ b/hedgewars/uPhysFSLayer.pas	Tue Mar 29 22:00:34 2016 +0300
@@ -13,7 +13,7 @@
     {$linklib physlayer}
 {$ENDIF}
 
-procedure initModule;
+procedure initModule(localPrefix, userPrefix: PChar);
 procedure freeModule;
 
 type PFSFile = pointer;
@@ -138,9 +138,9 @@
 procedure pfsMount(path: ansistring; mountpoint: PChar);
 begin
     if PHYSFS_mount(PChar(path), mountpoint, false) then
-        AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : ok')
+        //AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : ok')
     else
-        AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : FAILED ("' + shortstring(PHYSFS_getLastError()) + '")');
+        //AddFileLog('[PhysFS] mount ' + shortstring(path) + ' at ' + shortstring(mountpoint) + ' : FAILED ("' + shortstring(PHYSFS_getLastError()) + '")');
 end;
 
 procedure pfsMountAtRoot(path: ansistring);
@@ -148,7 +148,7 @@
     pfsMount(path, PChar(_S'/'));
 end;
 
-procedure initModule;
+procedure initModule(localPrefix, userPrefix: PChar);
 var i: LongInt;
     cPhysfsId: shortstring;
 {$IFNDEF MOBILE}
@@ -171,17 +171,17 @@
         begin
             fp := cFontsPaths[i];
             if fp <> nil then
-                pfsMount(ansistring(fp), PChar('/Fonts'));
+                pfsMount(ansistring(fp), _P'/Fonts');
         end;
 {$ENDIF}
 
-    pfsMountAtRoot(PathPrefix);
-    pfsMountAtRoot(UserPathPrefix + ansistring('/Data'));
+    pfsMountAtRoot(localPrefix);
+    pfsMountAtRoot(userPrefix + ansistring('/Data'));
 
     hedgewarsMountPackages;
 
     // need access to teams and frontend configs (for bindings)
-    pfsMountAtRoot(UserPathPrefix);
+    pfsMountAtRoot(userPrefix);
 
     if cTestLua then
         begin