mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58: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
|
||||
}
|
||||
|
||||
if count == 0 {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
ridl := make([]_RAWINPUTDEVICELIST, count)
|
||||
if _, err := _GetRawInputDeviceList(&ridl[0], &count); err != nil {
|
||||
return false, err
|
||||
|
Loading…
Reference in New Issue
Block a user