From 687e505db0f6e3c2d4ca7f39ae13757fb399a97f Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sat, 20 Jul 2024 19:37:50 +0900 Subject: [PATCH] internal/gamepad: specify dwHow explicitly As _DIPH_DEVICE is 0, this worked even without setting it, but this was less readable. --- internal/gamepad/gamepad_desktop_windows.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/gamepad/gamepad_desktop_windows.go b/internal/gamepad/gamepad_desktop_windows.go index 1726609f4..a140c17b1 100644 --- a/internal/gamepad/gamepad_desktop_windows.go +++ b/internal/gamepad/gamepad_desktop_windows.go @@ -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 }