mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-16 09:11:21 +00:00
- slow down frame updates for the start screen for slower GPU's, since this can increase loading time significantly
This commit is contained in:
parent
29a2ca0b13
commit
a1bdc0582c
1 changed files with 6 additions and 1 deletions
|
@ -654,9 +654,11 @@ void FStartScreen::NetProgress(int count)
|
|||
|
||||
void FStartScreen::Render(bool force)
|
||||
{
|
||||
static uint64_t minwaittime = 30;
|
||||
|
||||
auto nowtime = I_msTime();
|
||||
// Do not refresh too often. This function gets called a lot more frequently than the screen can update.
|
||||
if (nowtime - screen->FrameTime > 30 || force)
|
||||
if (nowtime - screen->FrameTime > minwaittime || force)
|
||||
{
|
||||
screen->FrameTime = nowtime;
|
||||
screen->BeginFrame();
|
||||
|
@ -689,6 +691,9 @@ void FStartScreen::Render(bool force)
|
|||
screen->Update();
|
||||
twod->OnFrameDone();
|
||||
}
|
||||
auto newtime = I_msTime();
|
||||
if (newtime - nowtime > minwaittime) // slow down drawing the start screen if we're on a slow GPU!
|
||||
minwaittime = (newtime - nowtime);
|
||||
}
|
||||
|
||||
FImageSource* CreateStartScreenTexture(FBitmap& srcdata);
|
||||
|
|
Loading…
Reference in a new issue