Added UIEventSequence::send_reverse()

This commit is contained in:
Ingo Ruhnke 2011-07-12 01:09:03 +02:00
parent d521e0ad0d
commit 2d1154a171
2 changed files with 12 additions and 0 deletions

View file

@ -64,4 +64,13 @@ UIEventSequence::send(UInput& uinput, int value)
}
}
void
UIEventSequence::send_reverse(UInput& uinput, int value)
{
for(UIEvents::reverse_iterator i = m_sequence.rbegin(); i != m_sequence.rend(); ++i)
{
uinput.send_key(i->get_device_id(), i->code, value);
}
}
/* EOF */

View file

@ -39,6 +39,9 @@ public:
void init(UInput& uinput, int slot, bool extra_devices);
void send(UInput& uinput, int value);
/** send the event sequence in reverse order */
void send_reverse(UInput& uinput, int value);
};
#endif