Why is the engine even checking input devices so often? Shouldn't the input device be registered via settings and then assumed to exist when the game runs? It seems wasteful to check all input devices every few seconds.
Exactly. It should enumerate them when the player opens settings. Or at startup. But even if it wants to do this, why is it doing it on the main thread!? :(
Fixing stutters in Papers Please on Linux
31–40 of 202 posts
Re: Fixing stutters in Papers Please on Linux
#32From the description of the problem (a freeze every 3 seconds) I knew exactly what it was. You can fix it by simply upgrading SDL as they fixed this bug 2 years ago. https://github.com/spurious/SDL-mirror/commit/59728f9802c786...
Why is it even doing this on the main thread at all? The obvious thing would be to have a background thread polling for changes and then sending messages asynchronously to the main thread if a change actually occurred...
Re: Fixing stutters in Papers Please on Linux
#33Re: Fixing stutters in Papers Please on Linux
#34From the description of the problem (a freeze every 3 seconds) I knew exactly what it was. You can fix it by simply upgrading SDL as they fixed this bug 2 years ago. https://github.com/spurious/SDL-mirror/commit/59728f9802c786...
Re: Fixing stutters in Papers Please on Linux
#35Re: Fixing stutters in Papers Please on Linux
#36I guess that is the kind of challenge to have Windows games on GNU/Linux, fix them instead of playing.
I remember playing Papers Please even before it had a native port, and enjoying it with zero problems.
Re: Fixing stutters in Papers Please on Linux
#37Earlier quoted context omitted.
Exactly. It should enumerate them when the player opens settings. Or at startup. But even if it wants to do this, why is it doing it on the main thread!? :(
If I start the game without a gamepad attached to the computer, and then attach the gamepad, I'd like to use the gamepad without restarting the game. And one would expect that polling the attached input devices should never take hundreds or thousands of milliseconds, there must be something seriously wrong in the Linux input device stack or maybe in one of the input device drivers.
Re: Fixing stutters in Papers Please on Linux
#38Earlier quoted context omitted.
Yes, and even if it checks for new devices, it should only need to check devices it hasn't already checked.
Ah, but are /dev/input entries reusable? Let's say you have /dev/input/event{0,10}, event5 is a USB keyboard, you unplug it, I assume event5 goes away. But then you plug in a controller, does this get mapped to event11, or does event5 get reused? Is the behaviour reliable in all versions of linux? You might argue that metadata should do the trick, but in my experience, on device files, anything beyond read/write is a…
Re: Fixing stutters in Papers Please on Linux
#39Re: Fixing stutters in Papers Please on Linux
#40Quoted post unavailable.