internal/gamepad: don't fail when inotify is unavailable on Linux

The inotify limits are per user, so another program can exhaust them and
make InotifyInit1 or InotifyAddWatch fail. That aborted RunGame with
"gamepad: InotifyAddWatch failed: no space left on device" even though
inotify is only used to detect hotplugged gamepads. GLFW ignores these
errors, so do the same and keep the gamepads found by the initial scan.

Closes #3304
This commit is contained in:
dualfroz committed 2026-09-11 23:26:34 +02:00
1 parent e2e4627cf0
commit f892849eeb
3 files changed
+96 -13

No files matched your search

+8
View File
@@ -23,3 +23,11 @@ const (
FFEffectUnionOffset = unsafe.Offsetof(ff_effect{}.u)
FFEffectRumbleOffset = unsafe.Offsetof(ff_effect{}.u) + unsafe.Offsetof(ff_effect_union{}.rumble)
)
const DirName = dirName
// InitNativeGamepadsForTest initializes the device-polling backend, as the first [Update] does.
func InitNativeGamepadsForTest() error {
var gs gamepads
return newNativeGamepadsImpl().init(&gs)
}