Skip to content

Commit

Permalink
add controller action set assert to make sure it's being set properly
Browse files Browse the repository at this point in the history
  • Loading branch information
BenLubar committed Oct 30, 2023
1 parent ee4e0d9 commit 65cd47e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/game/client/swarm/rd_steam_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,14 @@ void CRD_Steam_Controller::OnFrame( ISteamInput *pSteamInput )
}
}

#ifdef DBGFLAG_ASSERT
Assert( pSteamInput->GetCurrentActionSet( m_hController ) == hSet );
InputActionSetHandle_t ActiveLayers[STEAM_INPUT_MAX_ACTIVE_LAYERS];
int nActiveLayers = pSteamInput->GetActiveActionSetLayers( m_hController, ActiveLayers );
Assert( nActiveLayers == layers.Count() );
Assert( !V_memcmp( ActiveLayers, layers.Base(), layers.Count() * sizeof( layers[0] ) ) );
#endif

if ( rd_gamepad_player_color.GetBool() )
{
Color PlayerColor{};
Expand Down

0 comments on commit 65cd47e

Please sign in to comment.