hedgewars/uLocale.pas
branchios-revival
changeset 11141 01e8e5a6a8c1
parent 10249 b47ac2c19de3
child 11151 5c40c65b619d
--- a/hedgewars/uLocale.pas	Thu Aug 27 23:19:29 2015 +0200
+++ b/hedgewars/uLocale.pas	Thu Aug 27 23:21:07 2015 +0200
@@ -30,7 +30,7 @@
 function  GetEventString(e: TEventId): ansistring;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(str: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
 {$ENDIF}
 
 implementation
@@ -133,9 +133,17 @@
 end;
 
 {$IFDEF HWLIBRARY}
-procedure LoadLocaleWrapper(str: pchar); cdecl; export;
+procedure LoadLocaleWrapper(path: pchar; filename: pchar); cdecl; export;
 begin
-    LoadLocale(Strpas(str));
+    PathPrefix := Strpas(path);
+ 
+    uUtils.initModule(false);
+    uPhysFSLayer.initModule;
+ 
+    LoadLocale(Strpas(filename));
+ 
+    uPhysFSLayer.freeModule;
+    uUtils.freeModule;
 end;
 {$ENDIF}