Game-specific settings (#623)

This commit is contained in:
redphx
2025-01-28 11:28:26 +07:00
parent 91c8172564
commit e3f971845f
79 changed files with 2205 additions and 1426 deletions

View File

@@ -1,7 +1,7 @@
import { PrefKey } from "@/enums/pref-keys";
import { getPref } from "@/utils/settings-storages/global-settings-storage";
import { StreamPref } from "@/enums/pref-keys";
import { limitVideoPlayerFps } from "../stream/stream-settings-utils";
import { BxEventBus } from "@/utils/bx-event-bus";
import { getStreamPref } from "@/utils/pref-utils";
export class RendererShortcut {
static toggleVisibility() {
@@ -15,7 +15,7 @@ export class RendererShortcut {
const isVisible = !$mediaContainer.classList.contains('bx-gone');
// Switch FPS
limitVideoPlayerFps(isVisible ? getPref(PrefKey.VIDEO_MAX_FPS) : 0);
limitVideoPlayerFps(isVisible ? getStreamPref(StreamPref.VIDEO_MAX_FPS) : 0);
BxEventBus.Stream.emit('video.visibility.changed', { isVisible });
}
}