[PATCH vkd3d v2 1/2] vkd3d: Always use _BitScanReverse on Windows.

Alexandre Julliard julliard at winehq.org
Fri Jan 28 09:49:57 CST 2022


Use ULONG instead of unsigned long for non-Mingw msvcrt builds.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
v2: unchanged
---
 include/private/vkd3d_common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/private/vkd3d_common.h b/include/private/vkd3d_common.h
index b7ce9ae4046a..d22c26c098c7 100644
--- a/include/private/vkd3d_common.h
+++ b/include/private/vkd3d_common.h
@@ -88,10 +88,10 @@ static inline bool vkd3d_bitmask_is_contiguous(unsigned int mask)
 /* Undefined for x == 0. */
 static inline unsigned int vkd3d_log2i(unsigned int x)
 {
-#ifdef _MSC_VER
+#ifdef _WIN32
     /* _BitScanReverse returns the index of the highest set bit,
      * unlike clz which is 31 - index. */
-    unsigned long result;
+    ULONG result;
     _BitScanReverse(&result, x);
     return (unsigned int)result;
 #elif defined(HAVE_BUILTIN_CLZ)
-- 
2.34.1



More information about the wine-devel mailing list