Author :
Paul Cercueil
Date :
2021-03-24 22:37:08
Hash :1542300a Message :joystick: linux: Avoid checking for gamepad mapping each frame
The information whether a specific joystick can be used as a gamepad is
not going to change every frame, so we can cache the result into a
variable.
This dramatically reduces the performance impact of SDL2 on small
embedded devices, since the code path that is now avoided was quite
heavy.
Fixes #4229.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>