aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/client_virtualreality.cpp
diff options
context:
space:
mode:
authorMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
committerMichael Sartain <[email protected]>2014-10-02 08:25:55 -0700
commit55ed12f8d1eb6887d348be03aee5573d44177ffb (patch)
tree3686f7ca78c780cd9a3d367b79a9d9250c1be7c0 /sp/src/game/client/client_virtualreality.cpp
parent* Added support for Visual C++ 2013 Express to VPC (diff)
downloadsource-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.tar.xz
source-sdk-2013-55ed12f8d1eb6887d348be03aee5573d44177ffb.zip
Updated the SDK with the latest code from the TF and HL2 branches.
Diffstat (limited to 'sp/src/game/client/client_virtualreality.cpp')
-rw-r--r--sp/src/game/client/client_virtualreality.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/sp/src/game/client/client_virtualreality.cpp b/sp/src/game/client/client_virtualreality.cpp
index fb6e4417..af52b56e 100644
--- a/sp/src/game/client/client_virtualreality.cpp
+++ b/sp/src/game/client/client_virtualreality.cpp
@@ -261,8 +261,6 @@ CClientVirtualReality::CClientVirtualReality()
m_rtLastMotionSample = 0;
m_bMotionUpdated = false;
- m_bForceVRMode = false;
-
#if defined( USE_SDL )
m_nNonVRSDLDisplayIndex = 0;
#endif
@@ -1367,7 +1365,7 @@ void CClientVirtualReality::Activate()
return;
// These checks don't apply if we're in VR mode because Steam said so.
- if ( !m_bForceVRMode )
+ if ( !ShouldForceVRActive() )
{
// see if VR mode is even enabled
if ( materials->GetCurrentConfigForVideoCard().m_nVRModeAdapter == -1 )
@@ -1441,7 +1439,7 @@ void CClientVirtualReality::Activate()
vgui::ivgui()->SetVRMode( true );
// we can skip this extra mode change if we've always been in VR mode
- if ( !m_bForceVRMode )
+ if ( !ShouldForceVRActive() )
{
VRRect_t rect;
if ( g_pSourceVR->GetDisplayBounds( &rect ) )
@@ -1510,10 +1508,7 @@ void CClientVirtualReality::Deactivate()
// Called when startup is complete
void CClientVirtualReality::StartupComplete()
{
- if ( g_pSourceVR )
- m_bForceVRMode = g_pSourceVR->ShouldForceVRMode();
-
- if ( vr_activate_default.GetBool( ) || m_bForceVRMode )
+ if ( vr_activate_default.GetBool() || ShouldForceVRActive() )
Activate();
}