mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2026-10-12 06:28:00 +08:00
SDK sync.
This commit is contained in:
1 parent
4fb33274fb
commit
fdd0bbf277
413 files changed
+67257
-4
No files matched your search
@@ -0,0 +1,42 @@
|
||||
//===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
//===========================================================================//
|
||||
|
||||
#include "icvar.h"
|
||||
#include "tier1/tier1.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
|
||||
// ------------------------------------------------------------------------------------------- //
|
||||
// ConVar stuff.
|
||||
// ------------------------------------------------------------------------------------------- //
|
||||
class CShaderLibConVarAccessor : public IConCommandBaseAccessor
|
||||
{
|
||||
public:
|
||||
virtual bool RegisterConCommandBase( ConCommandBase *pCommand )
|
||||
{
|
||||
// Link to engine's list instead
|
||||
g_pCVar->RegisterConCommand( pCommand );
|
||||
|
||||
char const *pValue = g_pCVar->GetCommandLineValue( pCommand->GetName() );
|
||||
if( pValue && !pCommand->IsCommand() )
|
||||
{
|
||||
( ( ConVar * )pCommand )->SetValue( pValue );
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
CShaderLibConVarAccessor g_ConVarAccessor;
|
||||
|
||||
|
||||
void InitShaderLibCVars( CreateInterfaceFn cvarFactory )
|
||||
{
|
||||
if ( g_pCVar )
|
||||
{
|
||||
ConVar_Register( FCVAR_MATERIAL_SYSTEM_THREAD, &g_ConVarAccessor );
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user