Handle the files either skipped or not on windows.
This commit is contained in:
@@ -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()) );
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user