--- a/hedgewars/uLocale.pas Thu Sep 10 04:59:02 2015 +0200
+++ b/hedgewars/uLocale.pas Thu Sep 10 18:22:52 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}