mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 07:37:19 +02:00
Fix not setting default User-Agent correctly
This commit is contained in:
parent
b4a94c95c0
commit
362638ff0c
@ -1,4 +1,5 @@
|
||||
import { UserAgentProfile } from "@enums/user-agent";
|
||||
import { BX_FLAGS } from "./bx-flags";
|
||||
|
||||
type UserAgentConfig = {
|
||||
profile: UserAgentProfile,
|
||||
@ -35,7 +36,7 @@ export class UserAgent {
|
||||
static init() {
|
||||
UserAgent.#config = JSON.parse(window.localStorage.getItem(UserAgent.STORAGE_KEY) || '{}') as UserAgentConfig;
|
||||
if (!UserAgent.#config.profile) {
|
||||
UserAgent.#config.profile = UserAgentProfile.DEFAULT;
|
||||
UserAgent.#config.profile = (BX_FLAGS.DeviceInfo.deviceType === 'android-tv' || BX_FLAGS.DeviceInfo.deviceType === 'webos') ? UserAgentProfile.VR_OCULUS : UserAgentProfile.DEFAULT;
|
||||
}
|
||||
|
||||
if (!UserAgent.#config.custom) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user