Some stuff to ensure screen shows up in the correct place

This commit is contained in:
Simon 2023-12-09 10:38:10 +00:00
parent e6542f1d0f
commit 930d64b758

View file

@ -33,6 +33,8 @@ bool VR_UseScreenLayer()
(bool)((vr.cin_camera && !vr.immersive_cinematics) ||
vr.misc_camera ||
(CL_IsRunningInGameCinematic() || CL_InGameCinematicOnStandBy()) ||
(cls.state == CA_DISCONNECTED) ||
(cls.state == CA_CONNECTING) ||
(cls.state == CA_CINEMATIC) ||
(cls.state == CA_LOADING) ||
( Key_GetCatcher( ) & KEYCATCH_UI ) ||
@ -93,12 +95,13 @@ void VR_SetHMDOrientation(float pitch, float yaw, float roll)
void VR_SetHMDPosition(float x, float y, float z )
{
static bool s_useScreen = qfalse;
static int frame = 0;
VectorSet(vr.hmdposition, x, y, z);
//Can be set elsewhere
vr.take_snap |= s_useScreen != VR_UseScreenLayer();
if (vr.take_snap)
if (vr.take_snap || (frame++ < 100))
{
s_useScreen = VR_UseScreenLayer();