internal/gamepad: specify dwHow explicitly

As _DIPH_DEVICE is 0, this worked even without setting it, but this
was less readable.
This commit is contained in:
Hajime Hoshi 2024-07-20 19:37:50 +09:00
parent b6b08f4fce
commit 687e505db0

View File

@ -315,6 +315,7 @@ func (g *nativeGamepadsDesktop) dinput8EnumDevicesCallback(lpddi *_DIDEVICEINSTA
var prop _DIPROPGUIDANDPATH
prop.diph.dwHeaderSize = uint32(unsafe.Sizeof(_DIPROPHEADER{}))
prop.diph.dwSize = uint32(unsafe.Sizeof(_DIPROPGUIDANDPATH{}))
prop.diph.dwHow = _DIPH_DEVICE
if err := device.GetProperty(_DIPROP_GUIDANDPATH, &prop.diph); err != nil {
return "", err
}