mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-06-06 23:57:19 +02:00
Use "brand" instead of "manufacturer"
This commit is contained in:
parent
b0ecc7171b
commit
f0e7272a82
6
dist/better-xcloud.lite.user.js
vendored
6
dist/better-xcloud.lite.user.js
vendored
@ -3944,9 +3944,9 @@ class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
return str.toLowerCase().trim().replaceAll(/\s+/g, "-").replaceAll(/-+/g, "-");
|
return str.toLowerCase().trim().replaceAll(/\s+/g, "-").replaceAll(/-+/g, "-");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let { manufacturer, board, model } = androidInfo;
|
let { brand, board, model } = androidInfo;
|
||||||
manufacturer = normalize(manufacturer), board = normalize(board), model = normalize(model);
|
brand = normalize(brand), board = normalize(board), model = normalize(model);
|
||||||
let url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${manufacturer}/${board}-${model}.json`, json = await (await NATIVE_FETCH(url)).json(), recommended = {};
|
let url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${brand}/${board}-${model}.json`, json = await (await NATIVE_FETCH(url)).json(), recommended = {};
|
||||||
if (json.schema_version !== 1) return null;
|
if (json.schema_version !== 1) return null;
|
||||||
let scriptSettings = json.settings.script;
|
let scriptSettings = json.settings.script;
|
||||||
if (scriptSettings._base) {
|
if (scriptSettings._base) {
|
||||||
|
6
dist/better-xcloud.user.js
vendored
6
dist/better-xcloud.user.js
vendored
@ -5106,9 +5106,9 @@ class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
return str.toLowerCase().trim().replaceAll(/\s+/g, "-").replaceAll(/-+/g, "-");
|
return str.toLowerCase().trim().replaceAll(/\s+/g, "-").replaceAll(/-+/g, "-");
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let { manufacturer, board, model } = androidInfo;
|
let { brand, board, model } = androidInfo;
|
||||||
manufacturer = normalize(manufacturer), board = normalize(board), model = normalize(model);
|
brand = normalize(brand), board = normalize(board), model = normalize(model);
|
||||||
let url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${manufacturer}/${board}-${model}.json`, json = await (await NATIVE_FETCH(url)).json(), recommended = {};
|
let url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${brand}/${board}-${model}.json`, json = await (await NATIVE_FETCH(url)).json(), recommended = {};
|
||||||
if (json.schema_version !== 1) return null;
|
if (json.schema_version !== 1) return null;
|
||||||
let scriptSettings = json.settings.script;
|
let scriptSettings = json.settings.script;
|
||||||
if (scriptSettings._base) {
|
if (scriptSettings._base) {
|
||||||
|
@ -693,12 +693,12 @@ export class SettingsNavigationDialog extends NavigationDialog {
|
|||||||
|
|
||||||
// Get recommended settings from GitHub
|
// Get recommended settings from GitHub
|
||||||
try {
|
try {
|
||||||
let {manufacturer, board, model} = androidInfo!;
|
let {brand, board, model} = androidInfo!;
|
||||||
manufacturer = normalize(manufacturer);
|
brand = normalize(brand);
|
||||||
board = normalize(board);
|
board = normalize(board);
|
||||||
model = normalize(model);
|
model = normalize(model);
|
||||||
|
|
||||||
const url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${manufacturer}/${board}-${model}.json`;
|
const url = `https://raw.githubusercontent.com/redphx/better-xcloud/gh-pages/devices/${brand}/${board}-${model}.json`;
|
||||||
const response = await NATIVE_FETCH(url);
|
const response = await NATIVE_FETCH(url);
|
||||||
const json = (await response.json()) as RecommendedSettings;
|
const json = (await response.json()) as RecommendedSettings;
|
||||||
const recommended: PartialRecord<PrefKey, any> = {};
|
const recommended: PartialRecord<PrefKey, any> = {};
|
||||||
|
@ -16,6 +16,7 @@ export type BxFlags = {
|
|||||||
|
|
||||||
androidInfo?: {
|
androidInfo?: {
|
||||||
manufacturer: string,
|
manufacturer: string,
|
||||||
|
brand: string,
|
||||||
board: string,
|
board: string,
|
||||||
model: string,
|
model: string,
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user