diff options
| author | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
|---|---|---|
| committer | FluorescentCIAAfricanAmerican <[email protected]> | 2020-04-22 12:56:21 -0400 |
| commit | 3bf9df6b2785fa6d951086978a3e66f49427166a (patch) | |
| tree | 2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /utils/xbox/vxconsole/common.cpp | |
| download | archived-source-engine-2018-hl2-src-master.tar.xz archived-source-engine-2018-hl2-src-master.zip | |
Diffstat (limited to 'utils/xbox/vxconsole/common.cpp')
| -rw-r--r-- | utils/xbox/vxconsole/common.cpp | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/utils/xbox/vxconsole/common.cpp b/utils/xbox/vxconsole/common.cpp new file mode 100644 index 0000000..1b8418c --- /dev/null +++ b/utils/xbox/vxconsole/common.cpp @@ -0,0 +1,73 @@ +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// COMMON.CPP +// +// Common/Misc specialized support routines not uniquely owned. +//=====================================================================================// +#include "vxconsole.h" + +vprofState_e g_vprof_state = VPROF_OFF; + +//----------------------------------------------------------------------------- +// NotImplementedYet +// +//----------------------------------------------------------------------------- +void NotImplementedYet() +{ + Sys_MessageBox( "Attention!", "Sorry, Not Implemented Yet." ); +} + +//----------------------------------------------------------------------------- +// VProf_GetState +// +//----------------------------------------------------------------------------- +vprofState_e VProf_GetState() +{ + return g_vprof_state; +} + +//----------------------------------------------------------------------------- +// VProf_Enable +// +// Coordinates multiple vprof commands for proper exclusion +//----------------------------------------------------------------------------- +void VProf_Enable( vprofState_e state ) +{ + char commandString[256]; + + switch ( state ) + { + case VPROF_CPU: + strcpy( commandString, "vprof_off ; vprof_on ; vprof_update cpu" ); + break; + + case VPROF_TEXTURE: + strcpy( commandString, "vprof_off ; vprof_on ; vprof_update texture" ); + break; + + case VPROF_TEXTUREFRAME: + strcpy( commandString, "vprof_off ; vprof_on ; vprof_update texture_frame" ); + break; + + default: + state = VPROF_OFF; + strcpy( commandString, "vprof_off" ); + break; + + } + + // track state + if ( g_vprof_state != state ) + { + g_vprof_state = state; + + // do command + ProcessCommand( commandString ); + + // update all the dependant titles + CpuProfile_SetTitle(); + TexProfile_SetTitle(); + } +} + + |