Added rel repeat value of -1 for sending an event only once
This commit is contained in:
parent
9b03d47b29
commit
93b6e0d49b
1 changed files with 13 additions and 3 deletions
|
@ -466,13 +466,23 @@ RelButtonEventHandler::init(UInput& uinput, int slot, bool extra_devices)
|
|||
void
|
||||
RelButtonEventHandler::send(UInput& uinput, bool value)
|
||||
{
|
||||
if (value)
|
||||
if (m_repeat == -1)
|
||||
{
|
||||
uinput.send_rel_repetitive(m_code, m_value, m_repeat);
|
||||
if (value)
|
||||
{
|
||||
uinput.send_rel(m_code.get_device_id(), m_code.code, m_value);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uinput.send_rel_repetitive(m_code, m_value, -1);
|
||||
if (value)
|
||||
{
|
||||
uinput.send_rel_repetitive(m_code, m_value, m_repeat);
|
||||
}
|
||||
else
|
||||
{
|
||||
uinput.send_rel_repetitive(m_code, m_value, -1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue