This commit is contained in:
Rachael Alexanderson 2024-04-16 23:10:57 -04:00
commit b31c62568b
No known key found for this signature in database
GPG key ID: 26A8ACCE97115EE0
56 changed files with 691 additions and 450 deletions

View file

@ -654,12 +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.
#ifdef _DEBUG
if (nowtime - screen->FrameTime > 3000 || force)
#else
if (nowtime - screen->FrameTime > 30 || force)
if (nowtime - screen->FrameTime > minwaittime || force)
#endif
{
screen->FrameTime = nowtime;
@ -694,6 +693,9 @@ void FStartScreen::Render(bool force)
screen->Update();
twod->OnFrameDone();
}
auto newtime = I_msTime();
if ((newtime - nowtime) * 2.0 > minwaittime) // slow down drawing the start screen if we're on a slow GPU!
minwaittime = (newtime - nowtime) * 2.0;
}
FImageSource* CreateStartScreenTexture(FBitmap& srcdata);