News for hackers. Stuff that matters.
Re:Fixing stutters in Papers Please on Linux by charcircuit on Sunday January 02, 2022 @07:46AM (#29768301)
SDL wants to support hotplugging where you can plug a controller in after you have already started the game.
Re:Fixing stutters in Papers Please on Linux by vlovich123 on Sunday January 02, 2022 @10:35AM (#29769504)
Operating systems let you know when a device change has happened. You can even cache this where you pool the first time for the initial set of data and then you just check when a device is plugged in to update your knowledge of the state of the world.

I would imagine that’s what’s done if you’re running udev but maybe SDL doesn’t do that.

Re:Fixing stutters in Papers Please on Linux by Sharlin on Sunday January 02, 2022 @10:52AM (#29769670)
As has been noted in another subthread, SDL can do this but apparently the particular statically linked version shipped with Papers Please is compiled without udev or inotify support and has to fallback to manual checking.