From cef7c5a1a145aea98e91aad9e4cecf34a5919bf2 Mon Sep 17 00:00:00 2001 From: Lubos Date: Sat, 17 Jun 2023 21:55:47 +0200 Subject: [PATCH] OpenXR - Forgotten changes added --- Core/Config.cpp | 1 + Core/Config.h | 1 + UI/GameSettingsScreen.cpp | 3 +++ android/VRManifest.xml | 1 + 4 files changed, 6 insertions(+) diff --git a/Core/Config.cpp b/Core/Config.cpp index 7ce91c7064..5753b803b7 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -839,6 +839,7 @@ static const ConfigSetting vrSettings[] = { ConfigSetting("VREnableMotions", &g_Config.bEnableMotions, true, CfgFlag::PER_GAME), ConfigSetting("VRForce72Hz", &g_Config.bForce72Hz, true, CfgFlag::PER_GAME), ConfigSetting("VRManualForceVR", &g_Config.bManualForceVR, false, CfgFlag::PER_GAME), + ConfigSetting("VRPassthrough", &g_Config.bPassthrough, false, CfgFlag::PER_GAME), ConfigSetting("VRRescaleHUD", &g_Config.bRescaleHUD, true, CfgFlag::PER_GAME), ConfigSetting("VRCameraDistance", &g_Config.fCameraDistance, 0.0f, CfgFlag::PER_GAME), ConfigSetting("VRCameraHeight", &g_Config.fCameraHeight, 0.0f, CfgFlag::PER_GAME), diff --git a/Core/Config.h b/Core/Config.h index 0b23b59c8e..ae0c95b3d0 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -453,6 +453,7 @@ public: bool bEnableMotions; bool bForce72Hz; bool bManualForceVR; + bool bPassthrough; bool bRescaleHUD; float fCameraDistance; float fCameraHeight; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 817e8ee7d1..dd7b0bc23f 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1152,6 +1152,9 @@ void GameSettingsScreen::CreateVRSettings(UI::ViewGroup *vrSettings) { vr6DoF->SetEnabledPtr(&g_Config.bEnableVR); vrSettings->Add(new CheckBox(&g_Config.bEnableStereo, vr->T("Stereoscopic vision (Experimental)"))); vrSettings->Add(new CheckBox(&g_Config.bForce72Hz, vr->T("Force 72Hz update"))); + if (IsPassthroughSupported()) { + vrSettings->Add(new CheckBox(&g_Config.bPassthrough, vr->T("Enable passthrough"))); + } vrSettings->Add(new ItemHeader(vr->T("VR camera"))); vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fCanvasDistance, 1.0f, 15.0f, 12.0f, vr->T("Distance to 2D menus and scenes"), 1.0f, screenManager(), "")); diff --git a/android/VRManifest.xml b/android/VRManifest.xml index 4dfda7647a..dc1a3aa1eb 100644 --- a/android/VRManifest.xml +++ b/android/VRManifest.xml @@ -3,6 +3,7 @@ +