diff --git a/src/game/g_window.pas b/src/game/g_window.pas
index b8d0921b589b98eb4190e598cd1f8ea32766a41f..3adb2b616da1f09af1dfb5c3c7f0b0b09e1689fe 100644 (file)
--- a/src/game/g_window.pas
+++ b/src/game/g_window.pas
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
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();