From 2dc3ca5f011ab757975651d726ed0c9c2bdf6d0a Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 7 Feb 2025 18:19:53 +0100 Subject: [PATCH] did not mean to push this --- src/d_main.c | 4 ++-- src/i_time.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d_main.c b/src/d_main.c index 2df283550..be5b50dcd 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -877,7 +877,7 @@ void D_SRB2Loop(void) // Use the time before sleep for frameskip calculations: // post-sleep time is literally being intentionally wasted - deltasecs = (double)(finishprecise - enterprecise) / I_GetPrecisePrecision(); + deltasecs = (double)((INT64)finishprecise - enterprecise) / I_GetPrecisePrecision(); deltatics = deltasecs * NEWTICRATE; // If time spent this game loop exceeds a single tic, @@ -911,7 +911,7 @@ void D_SRB2Loop(void) } // Capture the time once more to get the real delta time. finishprecise = I_GetPreciseTime(); - deltasecs = (double)(finishprecise - enterprecise) / I_GetPrecisePrecision(); + deltasecs = (double)((INT64)finishprecise - enterprecise) / I_GetPrecisePrecision(); deltatics = deltasecs * NEWTICRATE; } } diff --git a/src/i_time.c b/src/i_time.c index ee6fe7f68..ab7187dfb 100644 --- a/src/i_time.c +++ b/src/i_time.c @@ -61,7 +61,7 @@ void I_UpdateTime(fixed_t timescale) ticratescaled = (double)TICRATE * FixedToDouble(timescale); enterprecise = I_GetPreciseTime(); - elapsedseconds = (double)(enterprecise - oldenterprecise) / I_GetPrecisePrecision(); + elapsedseconds = (double)((INT64)enterprecise - oldenterprecise) / I_GetPrecisePrecision(); tictimer += elapsedseconds; while (tictimer > 1.0/ticratescaled) {