--- a/hedgewars/hwengine.pas Sat Apr 23 16:57:27 2016 -0400
+++ b/hedgewars/hwengine.pas Sat Apr 23 17:03:38 2016 -0400
@@ -39,7 +39,7 @@
;
{$IFDEF HWLIBRARY}
-procedure RunEngine(argc: LongInt; argv: PPChar); cdecl; export;
+function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
procedure preInitEverything();
procedure initEverything(complete:boolean);
@@ -576,7 +576,7 @@
end;
{$IFDEF HWLIBRARY}
-procedure RunEngine(argc: LongInt; argv: PPChar); cdecl; export;
+function RunEngine(argc: LongInt; argv: PPChar): LongInt; cdecl; export;
begin
operatingsystem_parameter_argc:= argc;
operatingsystem_parameter_argv:= argv;
@@ -622,7 +622,7 @@
exit(HaltNoError);
{$ELSE}
{$IFDEF IPHONEOS}
- exit;
+ exit(HaltNoError);
{$ELSE}
halt(HaltNoError);
{$ENDIF}