diff --git a/Core/Config.cpp b/Core/Config.cpp index b0ea691409..fe8c88f32e 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -1148,6 +1148,7 @@ static const ConfigSetting vrSettings[] = { ConfigSetting("VREnableMotions", &g_Config.bEnableMotions, true), ConfigSetting("VRForce72Hz", &g_Config.bForce72Hz, true), ConfigSetting("VRManualForceVR", &g_Config.bManualForceVR, false), + ConfigSetting("VRRescaleHUD", &g_Config.bRescaleHUD, true), ConfigSetting("VRCameraDistance", &g_Config.fCameraDistance, 0.0f), ConfigSetting("VRCameraHeight", &g_Config.fCameraHeight, 0.0f), ConfigSetting("VRCameraSide", &g_Config.fCameraSide, 0.0f), diff --git a/Core/Config.h b/Core/Config.h index 7e5620d96b..7094e0a034 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -464,6 +464,7 @@ public: bool bEnableMotions; bool bForce72Hz; bool bManualForceVR; + bool bRescaleHUD; float fCameraDistance; float fCameraHeight; float fCameraSide; diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 884fea84d4..4b4ac601fa 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -341,8 +341,10 @@ static inline void FlipProjMatrix(Matrix4x4 &in, bool useBufferedRendering) { static inline bool GuessVRDrawingHUD(bool is2D, bool flatScreen) { bool hud = true; + //HUD can be disabled in settings + if (!g_Config.bRescaleHUD) hud = false; //HUD cannot be rendered in flatscreen - if (flatScreen) hud = false; + else if (flatScreen) hud = false; //HUD has to be 2D else if (!is2D) hud = false; //HUD has to be blended diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 0687d2bb29..1af4e292cd 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -1139,10 +1139,12 @@ void GameSettingsScreen::CreateVRSettings(UI::ViewGroup *vrSettings) { 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(), "")); vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fFieldOfViewPercentage, 100.0f, 200.0f, 100.0f, vr->T("Field of view scale"), 10.0f, screenManager(), vr->T("% of native FoV"))); - vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fHeadUpDisplayScale, 0.0f, 1.5f, 0.3f, vr->T("Heads-up display scale"), 0.1f, screenManager(), "")); + vrSettings->Add(new CheckBox(&g_Config.bRescaleHUD, vr->T("Heads-up display detection"))); + PopupSliderChoiceFloat* vrHudScale = vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fHeadUpDisplayScale, 0.0f, 1.5f, 0.3f, vr->T("Heads-up display scale"), 0.1f, screenManager(), "")); + vrHudScale->SetEnabledPtr(&g_Config.bRescaleHUD); + vrSettings->Add(new CheckBox(&g_Config.bManualForceVR, vr->T("Manual switching between flat screen and VR using SCREEN key"))); 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"))); vrSettings->Add(new CheckBox(&g_Config.bHeadRotationEnabled, vr->T("Map HMD rotations on keys instead of VR camera"))); PopupSliderChoiceFloat *vrHeadRotationScale = vrSettings->Add(new PopupSliderChoiceFloat(&g_Config.fHeadRotationScale, 0.1f, 10.0f, 5.0f, vr->T("Game camera rotation step per frame"), 0.1f, screenManager(), "°")); vrHeadRotationScale->SetEnabledPtr(&g_Config.bHeadRotationEnabled);