You need to sign in or sign up before continuing.
Commit 8613c9cb authored by hybrid's avatar hybrid

Manual autorepeat test. Similar to what Juliusctw suggested long time ago. But simpler now.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@884 dfc29bdd-3216-0410-991c-e03cc46cb475
parent aab57e20
...@@ -773,6 +773,22 @@ bool CIrrDeviceLinux::run() ...@@ -773,6 +773,22 @@ bool CIrrDeviceLinux::run()
break; break;
case KeyRelease: case KeyRelease:
if (!AutorepeatSupport)
{
// check for Autorepeat manually
// We'll do the same as Windows does: Only send KeyPressed
// So every KeyRelease is a real release
XEvent next_event;
XPeekEvent (event.xkey.display, &next_event);
if (next_event.type == KeyPress &&
next_event.xkey.keycode == event.xkey.keycode &&
next_event.xkey.time == event.xkey.time)
{
/* Ignore the key release event */
break;
}
}
// fall-through in case the release should be handled
case KeyPress: case KeyPress:
{ {
SKeyMap mp; SKeyMap mp;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment