mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-13 08:29:18 +02:00
Fix crashing in LoadingScreen
This commit is contained in:
@@ -204,7 +204,7 @@ BxEventBus.Script.on('ui.header.rendered', () => {
|
||||
BxEventBus.Stream.on('state.loading', () => {
|
||||
// Get title ID for screenshot's name
|
||||
if (window.location.pathname.includes('/launch/') && STATES.currentStream.titleInfo) {
|
||||
STATES.currentStream.titleSlug = productTitleToSlug(STATES.currentStream.titleInfo.product.title);
|
||||
STATES.currentStream.titleSlug = productTitleToSlug(STATES.currentStream.titleInfo.productInfo.title);
|
||||
} else {
|
||||
STATES.currentStream.titleSlug = 'remote-play';
|
||||
}
|
||||
|
@@ -35,7 +35,9 @@ export class LoadingScreen {
|
||||
LoadingScreen.$bgStyle = $bgStyle;
|
||||
}
|
||||
|
||||
LoadingScreen.setBackground(titleInfo.product.heroImageUrl || titleInfo.product.titledHeroImageUrl || titleInfo.product.tileImageUrl);
|
||||
if (titleInfo.productInfo) {
|
||||
LoadingScreen.setBackground(titleInfo.productInfo.heroImageUrl || titleInfo.productInfo.titledHeroImageUrl || titleInfo.productInfo.tileImageUrl);
|
||||
}
|
||||
|
||||
if (getGlobalPref(GlobalPref.LOADING_SCREEN_ROCKET) === LoadingScreenRocket.HIDE) {
|
||||
LoadingScreen.hideRocket();
|
||||
|
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@@ -36,7 +36,7 @@ type XcloudTitleInfo = {
|
||||
hasMkbSupport: boolean;
|
||||
};
|
||||
|
||||
product: {
|
||||
productInfo: {
|
||||
title: string;
|
||||
heroImageUrl: string;
|
||||
titledHeroImageUrl: string;
|
||||
|
Reference in New Issue
Block a user