Skip to content

Instantly share code, notes, and snippets.

@javiercantero
Created November 24, 2013 16:44
Show Gist options
  • Save javiercantero/7629235 to your computer and use it in GitHub Desktop.
Save javiercantero/7629235 to your computer and use it in GitHub Desktop.
The exact patch I applied to the FreeOrion 0.4.3 version of libOIS to get the keyboard working on Linux (see http://www.freeorion.org/forum/viewtopic.php?f=25&t=7719 for more info).
diff -rub ois-master/includes/linux/LinuxKeyboard.h ois-k1ll-x11_key_repeat_fix/includes/linux/LinuxKeyboard.h
--- ois-master/includes/linux/LinuxKeyboard.h 2013-11-22 18:36:58.131433711 +0100
+++ ois-k1ll-x11_key_repeat_fix/includes/linux/LinuxKeyboard.h 2013-11-22 18:48:08.343445383 +0100
@@ -68,7 +68,6 @@
XPeekEvent(display, &e);
if(e.type == KeyPress && e.xkey.keycode == event.xkey.keycode && (e.xkey.time - event.xkey.time) < 2)
{
- XNextEvent(display, &e);
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment