1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 23:52:20 +01:00

[d3d9] Fix cursor X/YHotSpot coordinate validation

This commit is contained in:
WinterSnowfall 2024-10-16 01:28:03 +03:00 committed by Robin Kertels
parent 860d038d77
commit 27ceecfad9

View File

@ -357,8 +357,8 @@ namespace dxvk {
return D3DERR_INVALIDCALL;
// It makes no sense to have a hotspot outside of the bitmap.
if (XHotSpot > std::max(inputWidth - 1, 0u)
|| YHotSpot > std::max(inputHeight - 1, 0u))
if ((inputWidth && (XHotSpot > inputWidth - 1))
|| (inputHeight && (YHotSpot > inputHeight - 1)))
return D3DERR_INVALIDCALL;
D3DPRESENT_PARAMETERS params;