Fix issue with window not showing up in vr. Fix issue with wrong steamvr path.

This commit is contained in:
HannahPadd committed 2026-07-22 17:42:12 +02:00
1 parent ade2298a69
commit 4e3abbb214
2 files changed
+21 -7

No files matched your search

+3 -1
View File
@@ -46,10 +46,12 @@ if (process.platform === 'linux') {
app.commandLine.appendSwitch('force-color-profile', 'srgb');
}
console.log(options);
// SteamVR will not see the application if this is not enabled
if (options.steam) {
app.commandLine.appendSwitch('enable-features', 'WebXR,WebXROpenXR');
app.commandLine.appendSwitch('enable-features', 'Vulkan,WebXR,WebXROpenXR');
app.commandLine.appendSwitch('enable-xr-sandbox');
app.commandLine.appendSwitch('use-vulkan');
}
app.setPath('userData', getGuiDataFolder());
@@ -5,18 +5,30 @@ import io.eiren.util.logging.LogManager
class Linux {
val path: String = System.getProperty("user.dir")
val isFrame = System.getenv("SLIME_SERVER_IS_FRAME")?.toInt()
fun updateLinux() {
updateLinuxSteamVRDriver()
}
fun updateLinuxSteamVRDriver() {
val steamVRLocation = SteamUtils.findAppLibraryLocation(250820)?.resolve("steamapps/common/SteamVR") ?: run {
LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR")
return
}
val pathRegPath = "$steamVRLocation/bin/vrpathreg.sh"
val pathRegPath =
if (isFrame == 1) {
"/opt/steamvr/bin/linuxarm64/vrpathreg"
} else {
val steamVRLocation = SteamUtils.findAppLibraryLocation(250820)?.resolve("steamapps/common/SteamVR")
if (steamVRLocation != null) {
LogManager.warning("SteamVR driver installation failed: couldn't find SteamVR")
null
} else {
"${steamVRLocation}/bin/vrpathreg.sh"
}
}
if (pathRegPath == null) return
val (findExitCode, _) = executeShellCommand(pathRegPath, "finddriver", "slimevr") ?: run {
LogManager.warning("SteamVR driver installation failed: couldn't run vrpathreg finddriver")
return
@@ -40,6 +52,6 @@ class Linux {
}
companion object {
private const val LINUX_STEAM_DRIVER_DIRECTORY = "slimevr-openvr-driver-x64-linux"
private const val LINUX_STEAM_DRIVER_DIRECTORY = "slimevr-openvr-driver"
}
}