whot/libevdev — pull request #2 by sorccu (2013-11-11 08:46:25+00:00)
Title: Add support for SYN event detection in libevdev_has_event_code.

Previously, `libevdev_has_event_code` would always return `1` for any EV_SYN code. This was probably because the `linux/input.h` did not define SYN_MAX and SYN_CNT unlike the other event types. This [seems to have been corrected](http://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?h=next&id=52764fed5049655926bcecaefd52f0a415ceb105) in 3.12.

I needed to properly detect EV_SYN support in my project, so I made this patch. I'm not very familiar with the source yet, so I may have missed a few spots somewhere, but the patch adds support for EV_SYN code detection in `libevdev_has_event_code()` and tries to be compatible with the existing style.