[bugfix/527] Prevents a downloaded oculus version from launching the original oculus version is not present

This commit is contained in:
LiamillionSS
2024-11-15 07:18:29 +11:00
parent 7c6c6147a6
commit 2f4bca108b
11 changed files with 43 additions and 19 deletions
@@ -127,6 +127,11 @@ export class OculusLauncherService extends AbstractLauncherService implements St
const prepareDowngradedVersion: () => Promise<string> = async () => {
const originalVersionPath = await prepareOriginalVersion().catch(() => null);
if (!originalVersionPath) {
throw CustomError.fromError(new Error("Original Oculus Beat Saber not installed"), BSLaunchError.ORIGINAL_OCULUS_NOT_INSTALLED);
}
const oculusLib = await lastValueFrom(this.oculusLib$.pipe(take(1), timeout(sToMs(30)), catchError(() => of(null))));
if(!oculusLib){
@@ -17,6 +17,7 @@ export enum BSLaunchError{
PROTON_NOT_SET = "PROTON_NOT_SET",
PROTON_NOT_FOUND = "PROTON_NOT_FOUND",
UNKNOWN_ERROR = "UNKNOWN_ERROR",
ORIGINAL_OCULUS_NOT_INSTALLED = "ORIGINAL_OCULUS_NOT_INSTALLED"
}
export enum BSLaunchEvent{