mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-05-23 20:16:56 +00:00
Implement GamepadUI interface and build configuration
- Add GAMEPADUI preprocessor definition to client_base.vpc - Add gamepadui to gamedlls build group in groups.vgc - Merge missing IGamepadUI interface calls into cdll_client_int.cpp - Add IsSteamDeck override for -gamepadui command line support
This commit is contained in:
parent
075fd045c7
commit
72ec1e308a
2726
GamepadUI/cdll_client_int.cpp
Normal file
2726
GamepadUI/cdll_client_int.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -353,6 +353,24 @@ class IClientPurchaseInterfaceV2 *g_pClientPurchaseInterface = (class IClientPur
|
||||
|
||||
static ConVar *g_pcv_ThreadMode = NULL;
|
||||
|
||||
// GAMEPADUI TODO - put this somewhere better. (Madi)
|
||||
#if defined( GAMEPADUI )
|
||||
const bool IsSteamDeck()
|
||||
{
|
||||
if ( CommandLine()->FindParm( "-gamepadui" ) )
|
||||
return true;
|
||||
|
||||
if ( CommandLine()->FindParm( "-nogamepadui" ) )
|
||||
return false;
|
||||
|
||||
const char *pszSteamDeckEnv = getenv( "SteamDeck" );
|
||||
if ( pszSteamDeckEnv && *pszSteamDeckEnv )
|
||||
return atoi( pszSteamDeckEnv ) != 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: interface for gameui to modify voice bans
|
||||
@ -1348,6 +1366,11 @@ void CHLClient::HudUpdate( bool bActive )
|
||||
g_pSixenseInput->SixenseFrame( 0, NULL );
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(GAMEPADUI)
|
||||
if (g_pGamepadUI != nullptr)
|
||||
g_pGamepadUI->OnUpdate( frametime );
|
||||
#endif // GAMEPADUI
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1711,6 +1734,11 @@ void CHLClient::LevelInitPostEntity( )
|
||||
IGameSystem::LevelInitPostEntityAllSystems();
|
||||
C_PhysPropClientside::RecreateAll();
|
||||
internalCenterPrint->Clear();
|
||||
|
||||
#if defined(GAMEPADUI)
|
||||
if (g_pGamepadUI != nullptr)
|
||||
g_pGamepadUI->OnLevelInitializePostEntity();
|
||||
#endif // GAMEPADUI
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -1777,6 +1805,11 @@ void CHLClient::LevelShutdown( void )
|
||||
|
||||
StopAllRumbleEffects();
|
||||
|
||||
#if defined(GAMEPADUI)
|
||||
if (g_pGamepadUI != nullptr)
|
||||
g_pGamepadUI->OnLevelShutdown();
|
||||
#endif // GAMEPADUI
|
||||
|
||||
gHUD.LevelShutdown();
|
||||
|
||||
internalCenterPrint->Clear();
|
||||
|
||||
@ -51,7 +51,7 @@ $Configuration
|
||||
$Compiler
|
||||
{
|
||||
$AdditionalIncludeDirectories ".\;$BASE;$SRCDIR\vgui2\include;$SRCDIR\vgui2\controls;$SRCDIR\game\shared;.\game_controls;$SRCDIR\thirdparty\sixensesdk\include"
|
||||
$PreprocessorDefinitions "$BASE;NO_STRING_T;CLIENT_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead"
|
||||
$PreprocessorDefinitions "$BASE;NO_STRING_T;CLIENT_DLL;VECTOR;VERSION_SAFE_STEAM_API_INTERFACES;PROTECTED_THINGS_ENABLE;strncpy=use_Q_strncpy_instead;_snprintf=use_Q_snprintf_instead;GAMEPADUI"
|
||||
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;fopen=dont_use_fopen" [$WIN32]
|
||||
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;" [$OSXALL]
|
||||
$PreprocessorDefinitions "$BASE;ENABLE_CHROMEHTMLWINDOW;USE_WEBM_FOR_REPLAY;" [$LINUXALL]
|
||||
|
||||
@ -12,6 +12,7 @@ $Group "gamedlls"
|
||||
{
|
||||
"client"
|
||||
"server"
|
||||
"gamepadui"
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user