mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/gamepad: ignore EPERM when opening gamepads (#2308)
This seems required for the Snap sandbox when probing a non-gamepad device node. Closes #2307
This commit is contained in:
parent
bb406c9b8f
commit
34a500c305
@ -108,6 +108,10 @@ func (*nativeGamepadsImpl) openGamepad(gamepads *gamepads, path string) (err err
|
||||
if err == unix.EACCES {
|
||||
return nil
|
||||
}
|
||||
// This happens with the Snap sandbox.
|
||||
if err == unix.EPERM {
|
||||
return nil
|
||||
}
|
||||
// This happens just after a disconnection.
|
||||
if err == unix.ENOENT {
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user