--- 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}