Add setting to enable/disable Game Bar feature

This commit is contained in:
redphx
2024-05-11 10:42:30 +07:00
parent 72579249b1
commit 6b88f73e34
5 changed files with 31 additions and 9 deletions

View File

@@ -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;