Add BX_EXPOSED.backButtonPressed()

This commit is contained in:
redphx
2024-07-17 17:38:59 +07:00
parent 585ec4a598
commit 58b83c4eb2

View File

@@ -4,6 +4,7 @@ import { deepClone, STATES } from "@utils/global";
import { getPref, PrefKey } from "@utils/preferences";
import { BxLogger } from "./bx-logger";
import { BX_FLAGS } from "./bx-flags";
import { StreamSettings } from "@/modules/stream/stream-settings";
export enum InputType {
CONTROLLER = 'Controller',
@@ -117,4 +118,14 @@ export const BxExposed = {
},
disableGamepadPolling: false,
backButtonPressed: () => {
const streamSettings = StreamSettings.getInstance();
if (streamSettings.isShowing()) {
streamSettings.hide();
return true;
}
return false;
},
};