Inactive Window Scrolling Fix

Fix for Windows 10's inactive window scrolling feature, so that scrolling through menus won't scroll windows on other screens.
This is a port of the New Vegas version made by luluco250, all credits go to them.

Fixes the problematic behavior of mouse scrolling not being fully captured by the game, which results in scrolling other applications in other windows due to Windows 10’s inactive window scroll feature.

This is more noticeable with multi-monitor setups, for example, when scrolling through a menu, you might notice your browser on another screen scrolls as well.

This is because the mouse cursor seems to not actually be restricted to the window. It’s obvious why this was never a problem before Windows 10, but now it needs fixing. 😉

This uses the ClipCursor() function of the Win32 API to restrict the mouse to the game window’s boundaries, only letting go when it loses focus (such as alt-tabbing).

This has also been tested with ReShade and thus should be compatible with other overlays as well.

For source code and building instructions, go here:
luluco250 for the original New Vegas version.