X-Git-Url: http://deadsoftware.ru/gitweb?a=blobdiff_plain;f=src%2Fgame%2Fg_window.pas;h=3adb2b616da1f09af1dfb5c3c7f0b0b09e1689fe;hb=a07765f3e726f5efff9fbaff0ac8917b0924c3ac;hp=b8d0921b589b98eb4190e598cd1f8ea32766a41f;hpb=fe124e7198cf5515dc005ed363c7989e19228134;p=d2df-sdl.git diff --git a/src/game/g_window.pas b/src/game/g_window.pas index b8d0921..3adb2b6 100644 --- a/src/game/g_window.pas +++ b/src/game/g_window.pas @@ -2,8 +2,7 @@ * * 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 @@ -65,7 +64,7 @@ uses const - ProgressUpdateMSecs = 1;//100; + ProgressUpdateMSecs = 35; //1;//100; var h_Wnd: PSDL_Window = nil; @@ -783,13 +782,17 @@ begin end; +{$IFNDEF HEADLESS} var prevLoadingUpdateTime: UInt64 = 0; +{$ENDIF} procedure ProcessLoading (forceUpdate: Boolean=false); var ev: TSDL_Event; +{$IFNDEF HEADLESS} stt: UInt64; +{$ENDIF} begin FillChar(ev, sizeof(ev), 0); wLoadingProgress := true; @@ -807,23 +810,15 @@ begin exit; end; +{$IFNDEF HEADLESS} if not wMinimized then begin - if forceUpdate then - begin - prevLoadingUpdateTime := getTimeMilli(); - end - else + if not forceUpdate then 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; -{$IFNDEF HEADLESS} if forceUpdate then begin DrawMenuBackground('INTER'); @@ -832,9 +827,10 @@ begin DrawLoadingStat(); g_Console_Draw(True); SwapBuffers(); + prevLoadingUpdateTime := getTimeMilli(); end; -{$ENDIF} end; +{$ENDIF} e_SoundUpdate();