diff --git a/src/game/Doom2DF.lpr b/src/game/Doom2DF.lpr
index 268e281a029f8e05fefb378a13db5d7fd20b6117..1e76da9f5a1f041b38e5920ca0dbac9c38300bd3 100644 (file)
--- a/src/game/Doom2DF.lpr
+++ b/src/game/Doom2DF.lpr
binPath: AnsiString = '';
forceBinDir: Boolean = False;
- wLoadingQuit: Boolean = false;
- Time, Time_Delta, Time_Old: Int64;
- Frame: Int64;
- flag: Boolean = false;
-
+ Time_Old: Int64;
NoSound: Boolean;
procedure Update ();
function ProcessMessage (): Boolean;
var
i, t: Integer;
+ flag: Boolean;
+ Time, Time_Delta: Int64;
+ Frame: Int64;
begin
result := sys_HandleInput();
- Time := sys_GetTicks();
+ Time := GetTickCount64();
Time_Delta := Time-Time_Old;
flag := false;
g_Map_ProfilersEnd();
g_Mons_ProfilersEnd();
- if wLoadingQuit then
- begin
- g_Game_Free();
- g_Game_Quit();
- end;
-
if (gExit = EXIT_QUIT) then
begin
result := true;
end;
{$ENDIF}
+ procedure ScreenResize (w, h: Integer);
+ begin
+ r_Render_Resize(w, h);
+ {$IFDEF ENABLE_HOLMES}
+ fuiScrWdt := w;
+ fuiScrHgt := h;
+ {$ENDIF}
+ g_Game_SetupScreenSize;
+ {$IFNDEF ANDROID}
+ (* This will fix menu reset on keyboard showing *)
+ g_Menu_Reset;
+ {$ENDIF}
+ //g_Game_ClearLoading;
+ {$IFDEF ENABLE_HOLMES}
+ if assigned(oglInitCB) then oglInitCB;
+ {$ENDIF}
+ end;
+
procedure Startup;
begin
Randomize;
e_InitSoundSystem(NoSound);
sys_Init;
sys_CharPress := @CharPress; (* install hook *)
+ sys_ScreenResize := @ScreenResize; (* install hook *)
g_Options_SetDefault;
g_Options_SetDefaultVideo;
g_Console_Initialize;
if (not gGameOn) and gAskLanguage then
g_Menu_AskLanguage;
{$ENDIF}
- Time_Old := sys_GetTicks();
+ Time_Old := GetTickCount64();
while not ProcessMessage() do begin end;
g_Console_WriteGameConfig;
{$IFNDEF HEADLESS}