internal/gamepad: ignore EACCES error for /dev/input

Updates #3057
This commit is contained in:
Hajime Hoshi 2024-08-08 11:35:37 +09:00
parent 3624486f8b
commit 9c80367f2f

View File

@ -54,6 +54,10 @@ func (g *nativeGamepadsImpl) init(gamepads *gamepads) error {
if err == unix.ENOENT {
return nil
}
// `/dev/input` might not be accessible in some environments (#3057).
if err == unix.EACCES {
return nil
}
return fmt.Errorf("gamepad: Stat failed: %w", err)
}
if stat.Mode&unix.S_IFDIR == 0 {