fix slow STestInput
This commit is contained in:
@@ -78,22 +78,15 @@ void ScreenTestInput::Update( float fDeltaTime )
|
|||||||
vector<CString> asInputs;
|
vector<CString> asInputs;
|
||||||
|
|
||||||
DeviceInput di;
|
DeviceInput di;
|
||||||
|
vector<DeviceInput> DeviceInputs;
|
||||||
FOREACH_InputDevice( d )
|
INPUTFILTER->GetPressedButtons( DeviceInputs );
|
||||||
|
FOREACH( DeviceInput, DeviceInputs, di )
|
||||||
{
|
{
|
||||||
FOREACH_ENUM2( DeviceButton, b )
|
|
||||||
{
|
|
||||||
di.device = d;
|
|
||||||
di.button = b;
|
|
||||||
|
|
||||||
if( !INPUTFILTER->IsBeingPressed(di) )
|
|
||||||
continue;
|
|
||||||
|
|
||||||
CString sTemp;
|
CString sTemp;
|
||||||
sTemp += INPUTMAN->GetDeviceSpecificInputString(di);
|
sTemp += INPUTMAN->GetDeviceSpecificInputString(*di);
|
||||||
|
|
||||||
GameInput gi;
|
GameInput gi;
|
||||||
if( INPUTMAPPER->DeviceToGame(di,gi) )
|
if( INPUTMAPPER->DeviceToGame(*di,gi) )
|
||||||
{
|
{
|
||||||
CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button];
|
CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button];
|
||||||
sTemp += ssprintf(" - Controller %d %s", gi.controller+1, sName.c_str() );
|
sTemp += ssprintf(" - Controller %d %s", gi.controller+1, sName.c_str() );
|
||||||
@@ -110,13 +103,12 @@ void ScreenTestInput::Update( float fDeltaTime )
|
|||||||
sTemp += " - not mapped";
|
sTemp += " - not mapped";
|
||||||
}
|
}
|
||||||
|
|
||||||
CString sComment = INPUTFILTER->GetButtonComment( di );
|
CString sComment = INPUTFILTER->GetButtonComment( *di );
|
||||||
if( sComment != "" )
|
if( sComment != "" )
|
||||||
sTemp += " - " + sComment;
|
sTemp += " - " + sComment;
|
||||||
|
|
||||||
asInputs.push_back( sTemp );
|
asInputs.push_back( sTemp );
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
m_textInputs.SetText( join( "\n", asInputs ) );
|
m_textInputs.SetText( join( "\n", asInputs ) );
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user