Add "full analog surface" support in DInput,OSX,SDL backends. (should not be needed for XInput)
This commit is contained in:
parent
38b01d176a
commit
f97d2a93c4
|
@ -267,8 +267,8 @@ Joystick::Joystick( /*const LPCDIDEVICEINSTANCE lpddi, */const LPDIRECTINPUTDEVI
|
|||
const LONG& ax = (&m_state_in.lX)[offset];
|
||||
|
||||
// each axis gets a negative and a positive input instance associated with it
|
||||
AddInput(new Axis(offset, ax, base, range.lMin-base));
|
||||
AddInput(new Axis(offset, ax, base, range.lMax-base));
|
||||
AddAnalogInputs(new Axis(offset, ax, base, range.lMin-base),
|
||||
new Axis(offset, ax, base, range.lMax-base));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,8 +64,8 @@ Joystick::Joystick(IOHIDDeviceRef device, std::string name, int index)
|
|||
AddInput(new Hat(e, m_device, Hat::down));
|
||||
AddInput(new Hat(e, m_device, Hat::left));
|
||||
} else {
|
||||
AddInput(new Axis(e, m_device, Axis::negative));
|
||||
AddInput(new Axis(e, m_device, Axis::positive));
|
||||
AddAnalogInputs(new Axis(e, m_device, Axis::negative),
|
||||
new Axis(e, m_device, Axis::positive));
|
||||
}
|
||||
}
|
||||
CFRelease(axes);
|
||||
|
|
|
@ -86,8 +86,8 @@ Joystick::Joystick(SDL_Joystick* const joystick, const int sdl_index, const unsi
|
|||
for (u8 i = 0; i != SDL_JoystickNumAxes(m_joystick); ++i)
|
||||
{
|
||||
// each axis gets a negative and a positive input instance associated with it
|
||||
AddInput(new Axis(i, m_joystick, -32768));
|
||||
AddInput(new Axis(i, m_joystick, 32767));
|
||||
AddAnalogInputs(new Axis(i, m_joystick, -32768),
|
||||
new Axis(i, m_joystick, 32767));
|
||||
}
|
||||
|
||||
#ifdef USE_SDL_HAPTIC
|
||||
|
|
Loading…
Reference in New Issue