fix slow STestInput

This commit is contained in:
Glenn Maynard
2005-12-28 20:41:51 +00:00
parent 4664c25bee
commit 3193f1b774
+6 -14
View File
@@ -78,22 +78,15 @@ void ScreenTestInput::Update( float fDeltaTime )
vector<CString> asInputs;
DeviceInput di;
FOREACH_InputDevice( d )
vector<DeviceInput> DeviceInputs;
INPUTFILTER->GetPressedButtons( DeviceInputs );
FOREACH( DeviceInput, DeviceInputs, di )
{
FOREACH_ENUM2( DeviceButton, b )
{
di.device = d;
di.button = b;
if( !INPUTFILTER->IsBeingPressed(di) )
continue;
CString sTemp;
sTemp += INPUTMAN->GetDeviceSpecificInputString(di);
sTemp += INPUTMAN->GetDeviceSpecificInputString(*di);
GameInput gi;
if( INPUTMAPPER->DeviceToGame(di,gi) )
if( INPUTMAPPER->DeviceToGame(*di,gi) )
{
CString sName = GAMESTATE->GetCurrentGame()->m_szButtonNames[gi.button];
sTemp += ssprintf(" - Controller %d %s", gi.controller+1, sName.c_str() );
@@ -110,13 +103,12 @@ void ScreenTestInput::Update( float fDeltaTime )
sTemp += " - not mapped";
}
CString sComment = INPUTFILTER->GetButtonComment( di );
CString sComment = INPUTFILTER->GetButtonComment( *di );
if( sComment != "" )
sTemp += " - " + sComment;
asInputs.push_back( sTemp );
}
}
m_textInputs.SetText( join( "\n", asInputs ) );
}