_BitScanReverse was introduced in Microsoft Visual Studio 2005

This commit is contained in:
Anonymous Maarten 2025-01-09 02:46:48 +01:00 committed by Ryan C. Gordon
parent a78104a47f
commit c8f3f1b461

View file

@ -78,7 +78,7 @@ SDL_FORCE_INLINE int SDL_MostSignificantBitIndex32(Uint32 x)
return -1; return -1;
} }
return _SDL_bsr_watcom(x); return _SDL_bsr_watcom(x);
#elif defined(_MSC_VER) #elif defined(_MSC_VER) && _MSC_VER >= 1400
unsigned long index; unsigned long index;
if (_BitScanReverse(&index, x)) { if (_BitScanReverse(&index, x)) {
return (int)index; return (int)index;