Skip to content

Commit c9e3e25

Browse files
authored
[Fix] Sideloaded game launch if offline (#1228)
* fix hp and sideloaded game launch if offline * lint fix
1 parent e5533e7 commit c9e3e25

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/backend/launcher.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { commandToArgsArray } from './storeManagers/legendary/library'
6767
import { searchForExecutableOnPath } from './utils/os/path'
6868
import { getHpOverlay } from './overlay'
6969
import { launchingGameShouldOpenOverlay } from './utils/shouldOpenOverlay'
70+
import { Listing } from '@valist/sdk/dist/typesApi'
7071

7172
async function prepareLaunch(
7273
gameSettings: GameSettings,
@@ -864,8 +865,13 @@ async function callRunner(
864865
return currentPromise
865866
}
866867
const hpOverlay = await getHpOverlay()
867-
const { shouldOpenOverlay, hyperPlayListing } =
868-
await launchingGameShouldOpenOverlay(gameInfo)
868+
let shouldOpenOverlay = false
869+
let hyperPlayListing: Listing | undefined = undefined
870+
if (isOnline()) {
871+
const shouldLaunchResult = await launchingGameShouldOpenOverlay(gameInfo)
872+
shouldOpenOverlay = shouldLaunchResult.shouldOpenOverlay
873+
hyperPlayListing = shouldLaunchResult.hyperPlayListing
874+
}
869875

870876
let promise = new Promise<ExecResult>((res, rej) => {
871877
const child = spawn(bin, commandParts, {

0 commit comments

Comments
 (0)