Refactor Game Bar

This commit is contained in:
redphx
2024-10-14 16:45:57 +07:00
parent 34159fad22
commit 1acb30e3af
9 changed files with 29 additions and 91 deletions

View File

@@ -39,6 +39,10 @@ export const enum ControllerDeviceVibration {
}
export type GameBarPosition = 'bottom-left' | 'bottom-right' | 'off';
export type GameBarPositionOptions = Record<GameBarPosition, string>;
function getSupportedCodecProfiles() {
const options: PartialRecord<CodecProfile, string> = {
default: t('default'),
@@ -323,12 +327,12 @@ export class GlobalSettingsStorage extends BaseSettingsStorage {
[PrefKey.GAME_BAR_POSITION]: {
requiredVariants: 'full',
label: t('position'),
default: 'bottom-left',
default: 'bottom-left' satisfies GameBarPosition,
options: {
'bottom-left': t('bottom-left'),
'bottom-right': t('bottom-right'),
'off': t('off'),
},
} satisfies GameBarPositionOptions,
},
[PrefKey.LOCAL_CO_OP_ENABLED]: {