Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

45 lines
1.2 KiB

//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
//=====================================================================================//
#include "icvar.h"
#include "convar.h"
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
// ------------------------------------------------------------------------------------------- //
// ConVar stuff.
// ------------------------------------------------------------------------------------------- //
class CMaterialSystemConVarAccessor : 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;
}
};
//EAPS3 : Make static.
static CMaterialSystemConVarAccessor g_ConVarAccessor;
void InitMaterialSystemLibCVars( CreateInterfaceFn cvarFactory )
{
if ( g_pCVar )
{
ConVar_Register( 0, &g_ConVarAccessor );
}
}