Handle the files either skipped or not on windows.

This commit is contained in:
Jason Felds
2013-04-30 23:24:29 -04:00
parent 3d52695085
commit c7269b63ff
4 changed files with 835 additions and 839 deletions
+4 -7
View File
@@ -128,9 +128,8 @@ void JoystickDevice::AddElement( int usagePage, int usage, IOHIDElementCookie co
void JoystickDevice::Open()
{
// Add elements to the queue for each Joystick
FOREACH_CONST( Joystick, m_vSticks, i )
for (Joystick const &js : m_vSticks)
{
const Joystick& js = *i;
#define ADD(x) if( js.x ) AddElementToQueue( js.x )
ADD( x_axis ); ADD( y_axis ); ADD( z_axis );
ADD( x_rot ); ADD( y_rot ); ADD( z_rot );
@@ -156,10 +155,8 @@ bool JoystickDevice::InitDevice( int vid, int pid )
void JoystickDevice::GetButtonPresses( vector<DeviceInput>& vPresses, IOHIDElementCookie cookie, int value, const RageTimer& now ) const
{
FOREACH_CONST( Joystick, m_vSticks, i )
for (Joystick const &js : m_vSticks)
{
const Joystick& js = *i;
if( js.x_axis == cookie )
{
float level = SCALE( value, js.x_min, js.x_max, -1.0f, 1.0f );
@@ -266,8 +263,8 @@ int JoystickDevice::AssignIDs( InputDevice startID )
void JoystickDevice::GetDevicesAndDescriptions( vector<InputDeviceInfo>& vDevices ) const
{
FOREACH_CONST( Joystick, m_vSticks, i )
vDevices.push_back( InputDeviceInfo(i->id,GetDescription()) );
for (Joystick &i : m_vSticks)
vDevices.push_back( InputDeviceInfo(i.id,GetDescription()) );
}
/*