better default InputHandler::GetDeviceSpecificInputString

This commit is contained in:
Glenn Maynard
2005-12-09 02:04:55 +00:00
parent d4db7a0dd0
commit b683be9023
2 changed files with 14 additions and 1 deletions
@@ -38,6 +38,19 @@ void InputHandler::ButtonPressed( DeviceInput di, bool Down )
}
}
CString InputHandler::GetDeviceSpecificInputString( const DeviceInput &di )
{
if( di.device == DEVICE_KEYBOARD )
{
char c = di.ToChar();
if( c )
return ssprintf( "Key %c", c );
return ssprintf( "Key %s", DeviceButtonToString(di.device, di.button).c_str() );
}
return di.ToString();
}
/*
* (c) 2003-2004 Glenn Maynard
* All rights reserved.