예제 #1
0
RelAxisEventHandler::RelAxisEventHandler(UInput& uinput, int slot, bool extra_devices,
                                         int device_id, int code, int repeat, float value) :
  m_code(UIEvent::create(static_cast<uint16_t>(device_id), EV_REL, code)),
  m_value(value),
  m_repeat(repeat),
  m_stick_value(0.0f),
  m_rest_value(0.0f),
  m_rel_emitter()
{
  m_code.resolve_device_id(slot, extra_devices);
  m_rel_emitter = uinput.add_rel(m_code.get_device_id(), m_code.code);
}
예제 #2
0
RelRepeatAxisEventHandler::RelRepeatAxisEventHandler(UInput& uinput, int slot, bool extra_devices,
                                                     const UIEvent& code, int value, float repeat) :
  m_code(code),
  m_value(value),
  m_repeat(repeat),
  m_stick_value(0),
  m_timer(0),
  m_rel_emitter()
{  
  m_code.resolve_device_id(slot, extra_devices);
  m_rel_emitter = uinput.add_rel(m_code.get_device_id(), m_code.code);
}