Since the rework of v4 a bug was present where if you closed & reopened the WebRTC WebSocket you'd lose the inputs from both mouse & keyboard.
After some tests it appears that unregistering the mouse & keyboard events in the store on WebSocket disconnection & then re-registering them when creating the peer connection (as for the touch & gamepad events) fixes this issue.
This PR is the aforementioned fix.
Sorry but as it's quite a technical issue, it's hard to provide a simple screen-record so you'll have to trust me on this 😬
Fixes #(no related issue)
Type of change
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
Description
Since the rework of v4 a bug was present where if you closed & reopened the WebRTC WebSocket you'd lose the inputs from both mouse & keyboard.
After some tests it appears that unregistering the mouse & keyboard events in the store on WebSocket disconnection & then re-registering them when creating the peer connection (as for the touch & gamepad events) fixes this issue.
This PR is the aforementioned fix.
Sorry but as it's quite a technical issue, it's hard to provide a simple screen-record so you'll have to trust me on this 😬
Fixes #(no related issue)
Type of change
Checklist