Detach VIRTUAL_GAMEPAD_ID from EmulatedMkbHandler

This commit is contained in:
redphx
2024-10-01 17:22:33 +07:00
parent 12d8d766dc
commit 8f6bc5cb1b
8 changed files with 1109 additions and 1413 deletions

View File

@@ -26,6 +26,7 @@ const PointerToMouseButton = {
4: 1,
}
export const VIRTUAL_GAMEPAD_ID = 'Xbox 360 Controller';
class WebSocketMouseDataProvider extends MouseDataProvider {
#pointerClient: PointerClient | undefined
@@ -136,10 +137,8 @@ export class EmulatedMkbHandler extends MkbHandler {
static readonly DEFAULT_DEADZONE_COUNTERWEIGHT = 0.01;
static readonly MAXIMUM_STICK_RANGE = 1.1;
static VIRTUAL_GAMEPAD_ID = 'Xbox 360 Controller';
#VIRTUAL_GAMEPAD = {
id: EmulatedMkbHandler.VIRTUAL_GAMEPAD_ID,
id: VIRTUAL_GAMEPAD_ID,
index: 3,
connected: false,
hapticActuators: null,