Skip to content

Commit

Permalink
Reuse retropad poll fn
Browse files Browse the repository at this point in the history
  • Loading branch information
sergystepanov committed Apr 22, 2024
1 parent d922e58 commit dceb6f9
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions web/js/input/retropad.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
import {KEY} from 'input'
import {log} from 'log';

const pollingIntervalMs = 4;
const pollingIntervalMs = 5;
let controllerChangedIndex = -1;

// Libretro config
Expand Down Expand Up @@ -91,8 +91,10 @@ const _getState = () => {
return controllerEncoded.slice(0, controllerChangedIndex + 1);
}

const _poll = poll(pollingIntervalMs, sendControllerState)

export const retropad = {
poll: poll(pollingIntervalMs, sendControllerState),
poll: _poll,
setKeyState,
setAxisChanged,
}

0 comments on commit dceb6f9

Please sign in to comment.