mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
internal/gamepad: bug fix: do not call GetRawInputDeviceList with the count 0
Updates #2696
This commit is contained in:
parent
bc2b373bca
commit
4267e5d22e
@ -414,6 +414,10 @@ func supportsXInput(guid windows.GUID) (bool, error) {
|
|||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if count == 0 {
|
||||||
|
return false, nil
|
||||||
|
}
|
||||||
|
|
||||||
ridl := make([]_RAWINPUTDEVICELIST, count)
|
ridl := make([]_RAWINPUTDEVICELIST, count)
|
||||||
if _, err := _GetRawInputDeviceList(&ridl[0], &count); err != nil {
|
if _, err := _GetRawInputDeviceList(&ridl[0], &count); err != nil {
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user