Skip to content

Commit

Permalink
fix flickering when returning to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
sd805 committed Nov 27, 2022
1 parent c5fbd77 commit bd0d89e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions L4D2VR/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ LeftHanded=false
VRScale=43.2
IPDScale=1.0
HideArms=false
HudDistance=2.0
HudSize=1.5
HudDistance=1.3
HudSize=1.1
HudAlwaysVisible=false
8 changes: 6 additions & 2 deletions L4D2VR/vr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,11 @@ void VR::SubmitVRTextures()
vr::VROverlay()->ShowOverlay(m_MainMenuHandle);
vr::VROverlay()->HideOverlay(m_HUDHandle);

vr::VRCompositor()->Submit(vr::Eye_Left, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
vr::VRCompositor()->Submit(vr::Eye_Right, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
if (!m_Game->m_EngineClient->IsInGame())
{
vr::VRCompositor()->Submit(vr::Eye_Left, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
vr::VRCompositor()->Submit(vr::Eye_Right, &m_VKBlankTexture.m_VRTexture, NULL, vr::Submit_Default);
}

return;
}
Expand Down Expand Up @@ -835,6 +838,7 @@ void VR::UpdateTracking()
m_RightControllerUp = VectorRotate(m_RightControllerUp, m_RightControllerRight, -45.0);

// controller angles
QAngle::VectorAngles(m_LeftControllerForward, m_LeftControllerUp, m_LeftControllerAngAbs);
QAngle::VectorAngles(m_RightControllerForward, m_RightControllerUp, m_RightControllerAngAbs);

PositionAngle viewmodelOffset = localPlayer->GetViewmodelOffset();
Expand Down
4 changes: 2 additions & 2 deletions L4D2VR/vr.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ class VR
float m_VRScale = 43.2;
float m_IpdScale = 1.0;
bool m_HideArms = false;
float m_HudDistance = 2.0;
float m_HudSize = 1.5;
float m_HudDistance = 1.3;
float m_HudSize = 1.1;
bool m_HudAlwaysVisible = false;

VR() {};
Expand Down

0 comments on commit bd0d89e

Please sign in to comment.