From c9ed4293f705c8494967254f4b1a3a37f1466261 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 12 Feb 2021 14:40:34 +0100 Subject: [PATCH] - backend update from Raze. --- src/common/2d/v_2ddrawer.cpp | 2 ++ src/common/utility/i_time.cpp | 9 --------- src/common/utility/i_time.h | 1 - 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/common/2d/v_2ddrawer.cpp b/src/common/2d/v_2ddrawer.cpp index fb4c63656c..0fd45a8bf0 100644 --- a/src/common/2d/v_2ddrawer.cpp +++ b/src/common/2d/v_2ddrawer.cpp @@ -746,6 +746,8 @@ void F2DDrawer::AddPoly(FGameTexture* img, FVector4* vt, size_t vtcount, unsigne RenderCommand dg; int method = 0; + if (!img->isValid()) return; + dg.mType = DrawTypeTriangles; if (clipx1 > 0 || clipy1 > 0 || clipx2 < GetWidth() - 1 || clipy2 < GetHeight() - 1) { diff --git a/src/common/utility/i_time.cpp b/src/common/utility/i_time.cpp index 023860d81a..61f7baecb6 100644 --- a/src/common/utility/i_time.cpp +++ b/src/common/utility/i_time.cpp @@ -185,15 +185,6 @@ double I_GetTimeFrac() return (CurrentFrameStartTime - ticStartTime) / (double)(ticNextTime - ticStartTime); } -double I_GetBuildTimeFrac() -{ - int currentTic = NSToBuildTic(CurrentFrameStartTime - FirstFrameStartTime); - uint64_t ticStartTime = FirstFrameStartTime + BuildTicToNS(currentTic); - uint64_t ticNextTime = FirstFrameStartTime + BuildTicToNS(currentTic + 1); - - return (CurrentFrameStartTime - ticStartTime) / (double)(ticNextTime - ticStartTime); -} - void I_FreezeTime(bool frozen) { if (frozen) diff --git a/src/common/utility/i_time.h b/src/common/utility/i_time.h index 6f95795dd6..4c63515ac9 100644 --- a/src/common/utility/i_time.h +++ b/src/common/utility/i_time.h @@ -17,7 +17,6 @@ uint64_t I_GetTimeNS(); int I_GetBuildTime(); double I_GetTimeFrac(); -double I_GetBuildTimeFrac(); // like I_GetTime, except it waits for a new tic before returning int I_WaitForTic(int);