Currently, the gamepad api is polled using the requestAnimationFrame callback. This is called once per frame. By default, electron is vsynced which means the refresh rate of the application is tied to the refresh rate of the monitor.
It's possible to disable the vsync by adding app.commandLine.appendSwitch('disable-frame-rate-limit') to main/index.ts. It would be nice to also make this configurable from the UI, but it would probably require to force a relaunch if this setting is changed.
We also need to investigate if it is necessary at all. It's possible increasing polling rate will simply saturate our limited bandwidth and offer no impact to the responsiveness of controls.
Currently, the gamepad api is polled using the requestAnimationFrame callback. This is called once per frame. By default, electron is vsynced which means the refresh rate of the application is tied to the refresh rate of the monitor.
It's possible to disable the vsync by adding
app.commandLine.appendSwitch('disable-frame-rate-limit')tomain/index.ts. It would be nice to also make this configurable from the UI, but it would probably require to force a relaunch if this setting is changed.We also need to investigate if it is necessary at all. It's possible increasing polling rate will simply saturate our limited bandwidth and offer no impact to the responsiveness of controls.