Okay, I just put out v25 of my "hijack" patch (VolAdj, BreakOut, ScreenBlanker, Vitals, MaxTempWarning, RotaryKnob fixes, etc..).

This is the first version to also include the long-awaited ioctl()'s for interfacing with userland applications. So.. if you own/support an Empeg application that currently requires the menuhack patches or whatever, please have a look at possibly integrating it into the menu system instead.

http://rtr.ca/empeg/

The programming interface is currently quite simple, and looks something like this:



/* Basic sequence for userland app to bind into the menu, display, and IR buttons */
/* Not shown: all "rc" return codes have to be checked for success/failure */

#include
int fd;
unsigned long data, buttons[5] = {5, IR_KW_PREVTRACK_PRESSED, IR_KW_PREVTRACK_RELEASED, IR_KW_NEXTTRACK_PRESSED, IR_KW_NEXTTRACK_RELEASED};
unsigned char screenbuf[EMPEG_SCREEN_BYTES] = {0,};

fd = open("/dev/empeg_display"); /* substitute the actual devicename -- I don't know it */
top: while (1) {
rc = ioctl(fd, EMPEG_HIJACK_WAITMENU, "MyStuff");
rc = ioctl(fd,EMPEG_HIJACK_BINDBUTTONS, buttons);
while (looping) {
rc = ioctl(fd,EMPEG_HIJACK_DISPWRITE, screenbuf);
/* or ioctl(fd,EMPEG_HIJACK_DISPTEXT, "Some\nText"); */
rc = ioctl(fd,EMPEG_HIJACK_WAITBUTTONS, &data);
}
rc = ioctl(fd,EMPEG_HIJACK_UNBINDBUTTONS, NULL); /* VERY important! */
}