hedgewars/uLocale.pas
changeset 11790 ac93cfc17365
parent 11684 cfc3971de8ac
child 11802 975c130c3901
--- a/hedgewars/uLocale.pas	Tue May 03 01:09:36 2016 +0200
+++ b/hedgewars/uLocale.pas	Tue May 03 01:13:41 2016 +0200
@@ -30,7 +30,7 @@
 function  GetEventString(e: TEventId): ansistring;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export;
 {$ENDIF}
 
 implementation
@@ -134,13 +134,14 @@
 end;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; userpath: pchar; filename: pchar); cdecl; export;
 begin
     PathPrefix := Strpas(path);
+    UserPathPrefix := Strpas(userpath);
  
-    uUtils.initModule(false);
-    uVariables.initModule;
-
+    //normally this var set in preInit of engine
+    allOK := true;
+    
     PathPrefix:= PathPrefix + #0;
     UserPathPrefix:= UserPathPrefix + #0;
     uPhysFSLayer.initModule(@PathPrefix[1], @UserPathPrefix[1]);
@@ -150,8 +151,6 @@
     LoadLocale(Strpas(filename));
  
     uPhysFSLayer.freeModule;
-    uVariables.freeModule;
-    uUtils.freeModule;
 end;
 {$ENDIF}