simplify
This commit is contained in:
@@ -55,31 +55,31 @@ void ScreenTestInput::Update( float fDeltaTime )
|
|||||||
di.device = d;
|
di.device = d;
|
||||||
di.button = b;
|
di.button = b;
|
||||||
|
|
||||||
if( INPUTFILTER->IsBeingPressed(di) )
|
if( !INPUTFILTER->IsBeingPressed(di) )
|
||||||
|
continue;
|
||||||
|
|
||||||
|
CString sTemp;
|
||||||
|
sTemp += di.toString();
|
||||||
|
|
||||||
|
GameInput gi;
|
||||||
|
if( INPUTMAPPER->DeviceToGame(di,gi) )
|
||||||
{
|
{
|
||||||
CString sTemp;
|
CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button];
|
||||||
sTemp += di.toString();
|
sTemp += ssprintf(" - Controller %d %s", gi.controller+1, sName.c_str() );
|
||||||
|
|
||||||
GameInput gi;
|
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
||||||
if( INPUTMAPPER->DeviceToGame(di,gi) )
|
|
||||||
{
|
{
|
||||||
CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button];
|
CString sSecondary = GAMEMAN->GetMenuButtonSecondaryFunction( GAMESTATE->GetCurrentGame(), gi.button );
|
||||||
sTemp += ssprintf(" - Controller %d %s", gi.controller+1, sName.c_str() );
|
if( !sSecondary.empty() )
|
||||||
|
sTemp += ssprintf(" - (%s secondary)", sSecondary.c_str() );
|
||||||
if( !PREFSMAN->m_bOnlyDedicatedMenuButtons )
|
|
||||||
{
|
|
||||||
CString sSecondary = GAMEMAN->GetMenuButtonSecondaryFunction( GAMESTATE->GetCurrentGame(), gi.button );
|
|
||||||
if( !sSecondary.empty() )
|
|
||||||
sTemp += ssprintf(" - (%s secondary)", sSecondary.c_str() );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
sTemp += " - not mapped";
|
|
||||||
}
|
|
||||||
|
|
||||||
asInputs.push_back( sTemp );
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sTemp += " - not mapped";
|
||||||
|
}
|
||||||
|
|
||||||
|
asInputs.push_back( sTemp );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user