From 6bcf65d526d1fe0a522a203a11468e132ee66023 Mon Sep 17 00:00:00 2001 From: Lubos Date: Wed, 8 Mar 2023 22:23:54 +0100 Subject: [PATCH] OpenXR - Only horizontal HMD rotations to keys --- Core/Config.cpp | 2 +- Core/Config.h | 2 +- UI/GameSettingsScreen.cpp | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index ca8e44e023..3b23a7791f 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1154,7 +1154,7 @@ static const ConfigSetting vrSettings[] = { ConfigSetting("VRMotionLength", &g_Config.fMotionLength, 0.5f), ConfigSetting("VRHeadRotationScale", &g_Config.fHeadRotationScale, 5.0f), ConfigSetting("VRHeadRotationSmoothing", &g_Config.bHeadRotationSmoothing, false), - ConfigSetting("VRHeadRotation", &g_Config.iHeadRotation, 0), + ConfigSetting("VRHeadRotation", &g_Config.iHeadRotation, false), }; struct ConfigSectionSettings { diff --git a/Core/Config.h b/Core/Config.h index 17f198f920..aa57a2d3c7 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -472,7 +472,7 @@ public: float fMotionLength; float fHeadRotationScale; bool bHeadRotationSmoothing; - int iHeadRotation; + bool iHeadRotation; // Debugger int iDisasmWindowX; diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 6c8f8469f3..0e902ad9a2 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1143,8 +1143,7 @@ void GameSettingsScreen::CreateVRSettings(UI::ViewGroup *vrSettings) { vrSettings->Add(new ItemHeader(vr->T("Experts only"))); vrSettings->Add(new CheckBox(&g_Config.bManualForceVR, vr->T("Manual switching between flat screen and VR using SCREEN key"))); - static const char *vrHeadRotations[] = { vr->T("Disabled"), vr->T("Horizontal only"), vr->T("Horizontal and vertical") }; - vrSettings->Add(new PopupMultiChoice(&g_Config.iHeadRotation, vr->T("Map HMD rotations on keys instead of VR camera"), vrHeadRotations, 0, ARRAY_SIZE(vrHeadRotations), vr->GetName(), screenManager())); + vrSettings->Add(new CheckBox(&g_Config.iHeadRotation, vr->T("Map HMD rotations on keys instead of VR camera"))); PopupSliderChoiceFloat *vrHeadRotationScale = vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fHeadRotationScale, 0.1f, 10.0f, vr->T("Game camera rotation step per frame"), 0.1f, screenManager(), "°")); vrHeadRotationScale->SetEnabledFunc([&] { return g_Config.iHeadRotation > 0; }); CheckBox *vrHeadRotationSmoothing = vrSettings->Add(new CheckBox(&g_Config.bHeadRotationSmoothing, vr->T("Game camera uses rotation smoothing")));