hedgewars/uPhysFSLayer.pas
branchqmlfrontend
changeset 11403 b894922d58cc
parent 10888 a04e04aaf599
parent 11155 a10143c3d87d
child 11607 f0dcdbb9b2fe
equal deleted inserted replaced
11076:fcbdee9cdd74 11403:b894922d58cc
   169 end;
   169 end;
   170 
   170 
   171 procedure initModule(localPrefix, userPrefix: PChar);
   171 procedure initModule(localPrefix, userPrefix: PChar);
   172 var i: LongInt;
   172 var i: LongInt;
   173     cPhysfsId: shortstring;
   173     cPhysfsId: shortstring;
       
   174 {$IFNDEF MOBILE}
   174     fp: PChar;
   175     fp: PChar;
       
   176 {$ENDIF}
   175 begin
   177 begin
   176     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   178     //TODO: http://icculus.org/pipermail/physfs/2011-August/001006.html
   177     cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   179     cPhysfsId:= GetCurrentDir() + {$IFDEF DARWIN}{$IFNDEF IPHONEOS}'/Hedgewars.app/Contents/MacOS/' + {$ENDIF}{$ENDIF} ' hedgewars';
   178 
   180 
   179     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   181     i:= PHYSFS_init(Str2PChar(cPhysfsId));
   180     //AddFileLog('[PhysFS] init: ' + inttostr(i));
   182     //AddFileLog('[PhysFS] init: ' + inttostr(i));
   181 
   183 
       
   184 {$IFNDEF MOBILE}
   182     // mount system fonts paths first
   185     // mount system fonts paths first
   183     for i:= low(cFontsPaths) to high(cFontsPaths) do
   186     for i:= low(cFontsPaths) to high(cFontsPaths) do
   184         begin
   187         begin
   185             fp := cFontsPaths[i];
   188             fp := cFontsPaths[i];
   186             if fp <> nil then
   189             if fp <> nil then
   187                 pfsMount(ansistring(fp), PChar('/Fonts'));
   190                 pfsMount(ansistring(fp), PChar('/Fonts'));
   188         end;
   191         end;
       
   192 {$ENDIF}
   189 
   193 
   190     pfsMountAtRoot(localPrefix);
   194     pfsMountAtRoot(localPrefix);
   191     pfsMountAtRoot(userPrefix + ansistring('/Data'));
   195     pfsMountAtRoot(userPrefix + ansistring('/Data'));
   192     pfsMount(userPrefix, PChar('/Config'));
   196     pfsMount(userPrefix, PChar('/Config'));
   193 
   197