OpenXR - Only horizontal HMD rotations to keys

This commit is contained in:
Lubos 2023-03-08 22:23:54 +01:00
parent 0fe5bd79c4
commit 6bcf65d526
3 changed files with 3 additions and 4 deletions

View File

@ -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 {

View File

@ -472,7 +472,7 @@ public:
float fMotionLength;
float fHeadRotationScale;
bool bHeadRotationSmoothing;
int iHeadRotation;
bool iHeadRotation;
// Debugger
int iDisasmWindowX;

View File

@ -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")));