- do not fade screen jobs in when in the menu.

This doesn't work properly because the timer is stopped, leading to visual artifacts with the fading.
This commit is contained in:
Christoph Oelckers 2020-09-16 19:11:36 +02:00
parent 6776508239
commit b0090b07fc

View file

@ -772,14 +772,18 @@ public:
} }
lastTime = now; lastTime = now;
if (screenfade < 1.f) if (screenfade < 1.f && !M_Active())
{ {
float ms = (clock / 1'000'000) / job.job->fadetime; float ms = (clock / 1'000'000) / job.job->fadetime;
screenfade = clamp(ms, 0.f, 1.f); screenfade = clamp(ms, 0.f, 1.f);
if (!M_Active()) twod->SetScreenFade(screenfade); twod->SetScreenFade(screenfade);
job.job->fadestate = DScreenJob::fadein; job.job->fadestate = DScreenJob::fadein;
} }
else job.job->fadestate = DScreenJob::visible; else
{
job.job->fadestate = DScreenJob::visible;
screenfade = 1.f;
}
job.job->SetClock(clock); job.job->SetClock(clock);
int state = job.job->Frame(clock, skiprequest); int state = job.job->Frame(clock, skiprequest);
clock = job.job->GetClock(); clock = job.job->GetClock();