We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5443

Summary: [PATCH] Implement SDL_MostSignificantBitIndex32 with MSVC intrinsics
Product: SDL Reporter: Cameron Gutman <cameron.gutman>
Component: *don't know*Assignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows 10   
Attachments: Patch

Description Cameron Gutman 2021-01-03 20:06:37 UTC
Created attachment 4636 [details]
Patch

MSVC provides a _BitScanReverse() intrinsic that we can use to implement SDL_MostSignificantBitIndex32().
Comment 1 Sam Lantinga 2021-01-03 21:57:31 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/2dd9827ac682