mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +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 {
|
if err == unix.EACCES {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
// This happens with the Snap sandbox.
|
||||||
|
if err == unix.EPERM {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
// This happens just after a disconnection.
|
// This happens just after a disconnection.
|
||||||
if err == unix.ENOENT {
|
if err == unix.ENOENT {
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user