mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-09-25 21:49:31 +02:00
Add setting to enable/disable Game Bar feature
This commit is contained in:
@@ -14,7 +14,12 @@ enum InputType {
|
||||
}
|
||||
|
||||
export const BxExposed = {
|
||||
// Enable/disable Game Bar when playing/pausing
|
||||
onPollingModeChanged: (mode: 'All' | 'None') => {
|
||||
if (!getPref(PrefKey.GAME_BAR_ENABLED)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!STATES.isPlaying) {
|
||||
GameBar.disable();
|
||||
return;
|
||||
|
@@ -32,6 +32,8 @@ export enum PrefKey {
|
||||
|
||||
STREAM_DISABLE_FEEDBACK_DIALOG = 'stream_disable_feedback_dialog',
|
||||
|
||||
GAME_BAR_ENABLED = 'game_bar_enabled',
|
||||
|
||||
LOCAL_CO_OP_ENABLED = 'local_co_op_enabled',
|
||||
// LOCAL_CO_OP_SEPARATE_TOUCH_CONTROLLER = 'local_co_op_separate_touch_controller',
|
||||
|
||||
@@ -312,6 +314,11 @@ export class Preferences {
|
||||
default: false,
|
||||
},
|
||||
|
||||
[PrefKey.GAME_BAR_ENABLED]: {
|
||||
label: t('enable-game-bar'),
|
||||
default: true,
|
||||
},
|
||||
|
||||
[PrefKey.LOCAL_CO_OP_ENABLED]: {
|
||||
label: t('enable-local-co-op-support'),
|
||||
default: false,
|
||||
@@ -437,6 +444,7 @@ export class Preferences {
|
||||
},
|
||||
[PrefKey.USER_AGENT_PROFILE]: {
|
||||
label: t('user-agent-profile'),
|
||||
note: '⚠️ ' + t('user-agent-note'),
|
||||
default: 'default',
|
||||
options: {
|
||||
[UserAgentProfile.DEFAULT]: t('default'),
|
||||
|
Reference in New Issue
Block a user