diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index 3e38a841fc74351bd56529596f5bc29b2aa2450e..3adb2b616da1f09af1dfb5c3c7f0b0b09e1689fe 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
const
const
- ProgressUpdateMSecs = 1;//100;
+ ProgressUpdateMSecs = 35; //1;//100;
var
h_Wnd: PSDL_Window = nil;
var
h_Wnd: PSDL_Window = nil;
end;
end;
+{$IFNDEF HEADLESS}
var
prevLoadingUpdateTime: UInt64 = 0;
var
prevLoadingUpdateTime: UInt64 = 0;
+{$ENDIF}
procedure ProcessLoading (forceUpdate: Boolean=false);
var
ev: TSDL_Event;
procedure ProcessLoading (forceUpdate: Boolean=false);
var
ev: TSDL_Event;
+{$IFNDEF HEADLESS}
stt: UInt64;
stt: UInt64;
+{$ENDIF}
begin
FillChar(ev, sizeof(ev), 0);
wLoadingProgress := true;
begin
FillChar(ev, sizeof(ev), 0);
wLoadingProgress := true;
exit;
end;
exit;
end;
+{$IFNDEF HEADLESS}
if not wMinimized then
begin
if not wMinimized then
begin
- if forceUpdate then
- begin
- prevLoadingUpdateTime := getTimeMilli();
- end
- else
+ if not forceUpdate then
begin
stt := getTimeMilli();
begin
stt := getTimeMilli();
- if (stt < prevLoadingUpdateTime) or (stt-prevLoadingUpdateTime >= ProgressUpdateMSecs) then
- begin
- prevLoadingUpdateTime := stt;
- forceUpdate := true;
- end;
+ forceUpdate := (stt < prevLoadingUpdateTime) or (stt-prevLoadingUpdateTime >= ProgressUpdateMSecs);
end;
end;
-{$IFNDEF HEADLESS}
if forceUpdate then
begin
DrawMenuBackground('INTER');
if forceUpdate then
begin
DrawMenuBackground('INTER');
DrawLoadingStat();
g_Console_Draw(True);
SwapBuffers();
DrawLoadingStat();
g_Console_Draw(True);
SwapBuffers();
+ prevLoadingUpdateTime := getTimeMilli();
end;
end;
-{$ENDIF}
end;
end;
+{$ENDIF}
e_SoundUpdate();
e_SoundUpdate();