From: Toni Wilen Date: Sun, 1 Jan 2023 13:56:02 +0000 (+0200) Subject: Removed forgotten 32-bit timer checks. X-Git-Tag: 41010~45 X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=863f78d1b5a086f9a66ba889ac483e936744fdad;p=francis%2Fwinuae.git Removed forgotten 32-bit timer checks. --- diff --git a/custom.cpp b/custom.cpp index 7a528cd0..ee5a46c3 100644 --- a/custom.cpp +++ b/custom.cpp @@ -10807,8 +10807,8 @@ static bool framewait(void) start = read_processor_time(); t = 0; - if ((int)start - (int)vsync_time >= 0 && (int)start - (int)vsync_time < vsynctimebase) { - t += (int)start - (int)vsync_time; + if (start - vsync_time >= 0 && start - vsync_time < vsynctimebase) { + t += start - vsync_time; } if (!frame_shown) { @@ -10993,7 +10993,7 @@ static void fpscounter(bool frameok) last = now - lastframetime; lastframetime = now; - if (bogusframe || (int)last < 0) { + if (bogusframe || last < 0) { return; } @@ -11984,7 +11984,7 @@ static bool sync_timeout_check(frame_time_t max) return true; #else frame_time_t rpt = read_processor_time(); - return (int)rpt - (int)max <= 0; + return rpt - max <= 0; #endif } diff --git a/newcpu.cpp b/newcpu.cpp index 5dd8a576..1b76faff 100644 --- a/newcpu.cpp +++ b/newcpu.cpp @@ -5282,7 +5282,7 @@ static void run_cpu_thread(void (*f)(void *)) frame_time_t next = vsyncmintimepre + (vsynctimebase * vpos / (maxvpos + 1)); frame_time_t c = read_processor_time(); - if ((int)next - (int)c > 0 && (int)next - (int)c < vsyncmaxtime * 2) + if (next - c > 0 && next - c < vsyncmaxtime * 2) continue; vp = vpos; diff --git a/od-win32/win32gfx.cpp b/od-win32/win32gfx.cpp index d7a621a0..2a6da468 100644 --- a/od-win32/win32gfx.cpp +++ b/od-win32/win32gfx.cpp @@ -1334,7 +1334,7 @@ static void CALLBACK blackinsertion_cb( while (strobo_active) { frame_time_t ct = read_processor_time(); - int diff = (int)strobo_time - (int)ct; + frame_time_t diff = strobo_time - ct; if (diff < -vsynctimebase / 2) { break; }