Add Polling rate setting

This commit is contained in:
redphx
2024-10-21 22:01:32 +07:00
parent 831fd98d02
commit 5e98c756d4
10 changed files with 56 additions and 11 deletions

View File

@@ -28,6 +28,7 @@ import { SettingElement, type BxHtmlSettingElement } from "@/utils/setting-eleme
import type { RecommendedSettings, SettingDefinition, SuggestedSettingCategory as SuggestedSettingProfile } from "@/types/setting-definition";
import { FullscreenText } from "../fullscreen-text";
import { BxLogger } from "@/utils/bx-logger";
import { updatePollingRate } from "@/utils/gamepad";
type SettingTabContentItem = Partial<{
@@ -460,6 +461,9 @@ export class SettingsNavigationDialog extends NavigationDialog {
pref: PrefKey.CONTROLLER_VIBRATION_INTENSITY,
unsupported: !VibrationManager.supportDeviceVibration(),
onChange: () => VibrationManager.updateGlobalVars(),
}, isFullVersion() && {
pref: PrefKey.CONTROLLER_POLLING_RATE,
onChange: () => updatePollingRate(),
}],
},