Hmm... right then. I do need to keep track of jiffies myself, but I don't think using EMPEG_HIJACK_POLLBUTTONS is the way to go at all. If I use that, then I have to throw in a while(no buttons pressed) loop, which causes the display to flash like crazy. I'm going to go out on a limb here, and suggest that EMPEG_HIJACK_POLLBUTTONS is probably only for those instances where you want to do some processing, but not at the expense of user input.

A better solution (at least, one that doesn't cause the screen to flash) is to still use EMPEG_HIJACK_WAITBUTTONS. If you want to hijack a long press, you need to hijack both _PRESSED and _RELEASED events for the particular button, but only have the _RELEASED event do what you want. When you get a _PRESSED event, then do a second ioctl(fd, EMPEG_HIJACK_WAITBUTTONS, &b) to pick up the release event, and check the delta between the two events to determine long vs. short press.

Cheers,