diff --git a/src/backend/storeManagers/gog/games.ts b/src/backend/storeManagers/gog/games.ts index 4b63577825..36bf506275 100644 --- a/src/backend/storeManagers/gog/games.ts +++ b/src/backend/storeManagers/gog/games.ts @@ -499,6 +499,7 @@ export async function launch( } = await prepareLaunch(gameSettings, gameInfo, isNative(appName)) if (!launchPrepSuccess) { appendGamePlayLog(gameInfo, `Launch aborted: ${launchPrepFailReason}`) + launchCleanup() showDialogBoxModalAuto({ title: t('box.error.launchAborted', 'Launch aborted'), message: launchPrepFailReason!, @@ -685,6 +686,8 @@ export async function launch( } }) + launchCleanup(rpcClient) + if (abort) { return true } @@ -693,8 +696,6 @@ export async function launch( logError(['Error launching game:', error], LogPrefix.Gog) } - launchCleanup(rpcClient) - return !error } diff --git a/src/backend/storeManagers/legendary/games.ts b/src/backend/storeManagers/legendary/games.ts index 8e98563b2a..7d7bb66a8b 100644 --- a/src/backend/storeManagers/legendary/games.ts +++ b/src/backend/storeManagers/legendary/games.ts @@ -853,6 +853,7 @@ export async function launch( } = await prepareLaunch(gameSettings, gameInfo, isNative(appName)) if (!launchPrepSuccess) { appendGamePlayLog(gameInfo, `Launch aborted: ${launchPrepFailReason}`) + launchCleanup() showDialogBoxModalAuto({ title: t('box.error.launchAborted', 'Launch aborted'), message: launchPrepFailReason!, diff --git a/src/backend/storeManagers/nile/games.ts b/src/backend/storeManagers/nile/games.ts index 2b3eae9164..d14c2f0a09 100644 --- a/src/backend/storeManagers/nile/games.ts +++ b/src/backend/storeManagers/nile/games.ts @@ -323,6 +323,7 @@ export async function launch( if (!launchPrepSuccess) { appendGamePlayLog(gameInfo, `Launch aborted: ${launchPrepFailReason}`) + launchCleanup() showDialogBoxModalAuto({ title: t('box.error.launchAborted', 'Launch aborted'), message: launchPrepFailReason!, diff --git a/src/backend/storeManagers/storeManagerCommon/games.ts b/src/backend/storeManagers/storeManagerCommon/games.ts index a24e0a5a01..61e3612e48 100644 --- a/src/backend/storeManagers/storeManagerCommon/games.ts +++ b/src/backend/storeManagers/storeManagerCommon/games.ts @@ -179,6 +179,7 @@ export async function launchGame( if (!launchPrepSuccess) { appendGamePlayLog(gameInfo, `Launch aborted: ${launchPrepFailReason}`) + launchCleanup() showDialogBoxModalAuto({ title: i18next.t('box.error.launchAborted', 'Launch aborted'), message: launchPrepFailReason!,