From b0090b07fcec4047c927fcaf9c9b28ba831f42c0 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 16 Sep 2020 19:11:36 +0200 Subject: [PATCH] - 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. --- source/core/screenjob.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/source/core/screenjob.cpp b/source/core/screenjob.cpp index ab396dc74..1ed0fc136 100644 --- a/source/core/screenjob.cpp +++ b/source/core/screenjob.cpp @@ -772,14 +772,18 @@ public: } lastTime = now; - if (screenfade < 1.f) + if (screenfade < 1.f && !M_Active()) { float ms = (clock / 1'000'000) / job.job->fadetime; screenfade = clamp(ms, 0.f, 1.f); - if (!M_Active()) twod->SetScreenFade(screenfade); + twod->SetScreenFade(screenfade); job.job->fadestate = DScreenJob::fadein; } - else job.job->fadestate = DScreenJob::visible; + else + { + job.job->fadestate = DScreenJob::visible; + screenfade = 1.f; + } job.job->SetClock(clock); int state = job.job->Frame(clock, skiprequest); clock = job.job->GetClock();