From 8874fd98102e39afb71d9739c4158751a670fb1f Mon Sep 17 00:00:00 2001 From: J Reece Wilson Date: Sat, 19 Aug 2023 18:49:16 +0100 Subject: [PATCH] [*] Cache Win8+ check --- Source/Threading/AuWakeOnAddress.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Source/Threading/AuWakeOnAddress.cpp b/Source/Threading/AuWakeOnAddress.cpp index 59e2ff26..34885138 100644 --- a/Source/Threading/AuWakeOnAddress.cpp +++ b/Source/Threading/AuWakeOnAddress.cpp @@ -363,8 +363,17 @@ namespace Aurora::Threading } #if defined(AURORA_IS_MODERNNT_DERIVED) - return pWaitOnAddress && + static AuOptionalEx gIsWaitOnRecommendedCache {}; + + if (gIsWaitOnRecommendedCache) + { + return gIsWaitOnRecommendedCache.value(); + } + + bool bState = pWaitOnAddress && AuSwInfo::IsWindows8Point1OrGreater(); + gIsWaitOnRecommendedCache = bState; + return bState; #elif defined(AURORA_PLATFORM_LINUX) return true; #endif