Skip to content

Commit

Permalink
Improve key mapping fix to not break on ealier versions of libcec
Browse files Browse the repository at this point in the history
  • Loading branch information
pssc authored and bramp committed Jun 11, 2013
1 parent 6829d78 commit e1e82d2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.cpp
Expand Up @@ -193,7 +193,12 @@ int Main::onCecKeyPress(const cec_keypress &key) {
if (uinputKey != 0) {
LOG4CPLUS_DEBUG(logger, "sent " << uinputKey);

// Fix for issues with ealier veriosns of libcec and key repeats below < 2.0.5
#if LIBCEC_VERSION_CURRENT < 0x2005
uinput.send_event(EV_KEY, uinputKey, key.duration == 0 ? 1 : 0);
#else
uinput.send_event(EV_KEY, uinputKey, key.duration == 0 ? 2 : 0);
#endif
uinput.sync();
}

Expand Down

0 comments on commit e1e82d2

Please sign in to comment.