summaryrefslogtreecommitdiff
path: root/tier0/xbox/xbox_console.cpp
blob: 7e9532cd944f59f5e8a122fe33576d7fd45a6ab7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: Xbox console link
//
//=====================================================================================//

#include "pch_tier0.h"
#include "xbox/xbox_console.h"
#include "tier0/memdbgon.h"

IXboxConsole *g_pXboxConsole;

typedef IXboxConsole * (WINAPI *CONSOLEINTERFACEFUNC)( void );

void XboxConsoleInit()
{
	g_pXboxConsole = NULL;

	HMODULE hDLL = ::LoadLibrary( "vxbdm_360.dll" );
	if ( !hDLL )
	{
		return;
	}

	CONSOLEINTERFACEFUNC fpnGetConsoleInterface = (CONSOLEINTERFACEFUNC) ::GetProcAddress( hDLL, "GetConsoleInterface" );

	if ( fpnGetConsoleInterface )
	{
		g_pXboxConsole = fpnGetConsoleInterface();
	}
}