From 154ccf88494b86ae73ab30d14d0505e7cb47255c Mon Sep 17 00:00:00 2001 From: Roman Fomin Date: Tue, 8 Oct 2024 20:05:49 +0700 Subject: [PATCH] fix CreateWaitableTimer on Windows 7 --- src/i_timer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/i_timer.c b/src/i_timer.c index 78f2c064..2e99c1a2 100644 --- a/src/i_timer.c +++ b/src/i_timer.c @@ -153,10 +153,11 @@ void I_InitTimer(void) CREATE_WAITABLE_TIMER_MANUAL_RESET | CREATE_WAITABLE_TIMER_HIGH_RESOLUTION, TIMER_ALL_ACCESS); - #else - hTimer = CreateWaitableTimer(NULL, TRUE, NULL); #endif - + if (hTimer == NULL) + { + hTimer = CreateWaitableTimer(NULL, TRUE, NULL); + } if (hTimer == NULL) { I_Error("I_InitTimer: CreateWaitableTimer failed");