mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-13 08:29:18 +02:00
Use PartialRecord type
This commit is contained in:
@@ -16,8 +16,8 @@ if (currentGamepad.id in window.BX_STREAM_SETTINGS.controllers) {
|
||||
const MIN_RANGE = 0.1;
|
||||
|
||||
const { mapping, ranges } = controller.customization;
|
||||
const pressedButtons: Partial<Record<keyof XcloudGamepad, number>> = {};
|
||||
const releasedButtons: Partial<Record<keyof XcloudGamepad, number>> = {};
|
||||
const pressedButtons: PartialRecord<keyof XcloudGamepad, number> = {};
|
||||
const releasedButtons: PartialRecord<keyof XcloudGamepad, number> = {};
|
||||
let isModified = false;
|
||||
|
||||
// Limit left trigger range
|
||||
|
@@ -40,7 +40,7 @@ export class ControllerCustomizationsManagerDialog extends BaseProfileManagerDia
|
||||
},
|
||||
} satisfies ControllerCustomizationPresetData;
|
||||
|
||||
private selectsMap: Partial<Record<GamepadKey, HTMLSelectElement>> = {};
|
||||
private selectsMap: PartialRecord<GamepadKey, HTMLSelectElement> = {};
|
||||
private selectsOrder: GamepadKey[] = [];
|
||||
|
||||
private isDetectingButton: boolean = false;
|
||||
|
@@ -19,7 +19,7 @@ export class ControllerShortcutsManagerDialog extends BaseProfileManagerDialog<C
|
||||
// private readonly LOG_TAG = 'ControllerShortcutsManagerDialog';
|
||||
|
||||
protected $content: HTMLElement;
|
||||
private selectActions: Partial<Record<GamepadKey, HTMLSelectElement>> = {};
|
||||
private selectActions: PartialRecord<GamepadKey, HTMLSelectElement> = {};
|
||||
|
||||
protected readonly BLANK_PRESET_DATA = {
|
||||
mapping: {},
|
||||
|
Reference in New Issue
Block a user