RageInput::DeviceInputToChar (not keyboard-specific)

This commit is contained in:
Glenn Maynard
2006-06-15 03:33:29 +00:00
parent 25b8421da0
commit 825d59ec44
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -97,6 +97,23 @@ RString RageInput::GetDeviceSpecificInputString( const DeviceInput &di )
return di.ToString();
}
wchar_t RageInput::DeviceInputToChar( DeviceInput di, bool bUseCurrentKeyModifiers )
{
FOREACH( InputHandler*, m_pDevices, i )
{
vector<InputDeviceInfo> vDevices;
(*i)->GetDevicesAndDescriptions( vDevices );
FOREACH_CONST( InputDeviceInfo, vDevices, idi )
{
if( idi->id == di.device )
return (*i)->DeviceButtonToChar(di.button, bUseCurrentKeyModifiers);
}
}
return '\0';
}
wchar_t RageInput::DeviceButtonToChar( DeviceButton button, bool bUseCurrentKeyModifiers )
{
FOREACH( InputHandler*, m_pDevices, i )