OpenXR - Camera controls adjust HUD instead of FOV

This commit is contained in:
Lubos 2022-11-25 09:25:23 +01:00
parent a58ea86318
commit 08432dd4e1
3 changed files with 6 additions and 6 deletions

View File

@ -316,9 +316,9 @@ void UpdateVRInput(bool(*NativeAxis)(const AxisInput &axis), bool(*NativeKey)(co
g_Config.fCameraHeight = clampFloat(g_Config.fCameraHeight, -50.0f, 50.0f);
break;
case JOYSTICK_AXIS_Z:
if (axis.second < -0.75f) g_Config.fFieldOfViewPercentage -= 1.0f;
if (axis.second > 0.75f) g_Config.fFieldOfViewPercentage += 1.0f;
g_Config.fFieldOfViewPercentage = clampFloat(g_Config.fFieldOfViewPercentage, 100.0f, 200.0f);
if (axis.second < -0.75f) g_Config.fHeadUpDidplayScale -= 0.01f;
if (axis.second > 0.75f) g_Config.fHeadUpDidplayScale += 0.01f;
g_Config.fHeadUpDidplayScale = clampFloat(g_Config.fHeadUpDidplayScale, 0.2f, 1.0f);
break;
case JOYSTICK_AXIS_RZ:
if (axis.second > 0.75f) g_Config.fCameraDistance -= 0.1f;

View File

@ -1214,7 +1214,7 @@ static ConfigSetting vrSettings[] = {
ConfigSetting("VRCameraSide", &g_Config.fCameraSide, 0.0f),
ConfigSetting("VRCanvasDistance", &g_Config.fCanvasDistance, 6.0f),
ConfigSetting("VRFieldOfView", &g_Config.fFieldOfViewPercentage, 100.0f),
ConfigSetting("VRHeadUpDidplayScale", &g_Config.fHeadUpDidplayScale, 0.5f),
ConfigSetting("VRHeadUpDidplayScale", &g_Config.fHeadUpDidplayScale, 0.3f),
ConfigSetting("VRMotionLength", &g_Config.fMotionLength, 0.5f),
ConfigSetting(false),

View File

@ -392,8 +392,8 @@ void LinkedShader::UpdateUniforms(u32 vertType, const ShaderID &vsid, bool useBu
!gstate.isFogEnabled() && //2D content cannot be rendered with fog on
!gstate.isDepthWriteEnabled(); //This breaks minimap in GTA but works elsewhere
if (hud) {
render_->SetUniformF1(&u_scaleX, g_Config.fHeadUpDidplayScale);
render_->SetUniformF1(&u_scaleY, g_Config.fHeadUpDidplayScale / 480.0f * 272.0f);
render_->SetUniformF1(&u_scaleX, g_Config.fHeadUpDidplayScale * 480.0f / 272.0f);
render_->SetUniformF1(&u_scaleY, g_Config.fHeadUpDidplayScale);
} else {
render_->SetUniformF1(&u_scaleX, 1.0f);
render_->SetUniformF1(&u_scaleY, 1.0f);