mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-07 08:07:18 +02:00
Fix note
This commit is contained in:
parent
9864954c81
commit
0fd926eff4
@ -29,7 +29,7 @@ export class ControllerCustomizationsManagerDialog extends BaseProfileManagerDia
|
|||||||
private $rightStickDeadzone!: BxDualNumberStepper;
|
private $rightStickDeadzone!: BxDualNumberStepper;
|
||||||
private $btnDetect!: HTMLButtonElement;
|
private $btnDetect!: HTMLButtonElement;
|
||||||
|
|
||||||
protected BLANK_PRESET_DATA = {
|
protected readonly BLANK_PRESET_DATA = {
|
||||||
mapping: {},
|
mapping: {},
|
||||||
settings: {
|
settings: {
|
||||||
leftTriggerRange: [0, 100],
|
leftTriggerRange: [0, 100],
|
||||||
@ -393,9 +393,18 @@ export class ControllerCustomizationsManagerDialog extends BaseProfileManagerDia
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Show note if it has settings other than 'vibrationIntensity'
|
// Show note if it has settings other than 'vibrationIntensity'
|
||||||
const settingKeys = Object.keys(presetData.settings) as Array<keyof typeof presetData.settings>;
|
let key: keyof typeof presetData.settings;
|
||||||
if (settingKeys.filter(key => key !== 'vibrationIntensity').length) {
|
for (key in presetData.settings) {
|
||||||
showNote = true;
|
if (key === 'vibrationIntensity') {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const value = presetData.settings[key];
|
||||||
|
// Non-default value
|
||||||
|
if (Array.isArray(value) && (value[0] !== 0 || value[1] !== 100)) {
|
||||||
|
showNote = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const fragment = document.createDocumentFragment();
|
const fragment = document.createDocumentFragment();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user