fix(linux): skip oculus library detection

Since linux doesn't have a registry, trying to read from it will fail.
With this fix and my other pr #264 basic linux functionallity works.
This commit is contained in:
RedlineTriad
2023-06-29 22:12:36 +02:00
committed by MathieuG-P
parent 0f85e0dcf9
commit 20cf93103d
+9 -2
View File
@@ -2,6 +2,7 @@ import { UtilsService } from "./utils.service";
import regedit from 'regedit'
import path from "path";
import { pathExist } from "../helpers/fs.helpers";
import log from "electron-log";
export class OculusService {
@@ -24,9 +25,15 @@ export class OculusService {
return this.utils.taskRunning("OculusClient.exe");
}
public async getOculusLibsPath(): Promise<string[]>{
public async getOculusLibsPath(): Promise<string[]> {
if (process.platform !== "win32") {
log.info("Oculus library auto-detection not supported on non-windows platforms");
return null;
}
if(this.oculusPaths){ return this.oculusPaths; }
if (this.oculusPaths) {
return this.oculusPaths;
}
const oculusLibsRegKey = "HKCU\\SOFTWARE\\Oculus VR, LLC\\Oculus\\Libraries";