Basic Steam Dick support (#166)

Without gamepadui library
This commit is contained in:
exstrim401
2023-01-08 17:38:24 +05:00
committed by GitHub
parent f63849bb34
commit e26b40d889
6 changed files with 62 additions and 10 deletions

View File

@@ -258,7 +258,15 @@ void CHudCrosshair::Paint( void )
pWeapon->GetWeaponCrosshairScale( flWeaponScale );
}
float flPlayerScale = 1.0f;
int iScreenDiv = 1600;
if ( IsSteamDeck() )
iScreenDiv = 1440;
float flPlayerScale;
if ( !m_pCrosshair->bRenderUsingFont )
flPlayerScale = (ScreenHeight() / iScreenDiv) + 1;
else
flPlayerScale = 1.0f;
#ifdef TF_CLIENT_DLL
Color clr( cl_crosshair_red.GetInt(), cl_crosshair_green.GetInt(), cl_crosshair_blue.GetInt(), 255 );
flPlayerScale = cl_crosshair_scale.GetFloat() / 32.0f; // the player can change the scale in the options/multiplayer tab