Posted by: Andre81
How to give display back to the player - 21/08/2005 17:44
I've attached my own menu item to the hijack menu and if i select the item i can take over the display and draw on it, but how do i give the display back to the player?
I've cleared and closed the display, but than it's just black. Actually my process has even terminated. How do i tell hijack that i don't want the display any longer?
Thanks
Posted by: tonyc
Re: How to give display back to the player - 21/08/2005 20:24
rc = ioctl(fd, EMPEG_HIJACK_WAITMENU, NULL);
is the way to unbind from the display and menus. If you need to re-bind to the menus (so the app can be selected from the menu again) you need to do the above call followed by:
rc = ioctl(fd, EMPEG_HIJACK_WAITMENU, &menulabels);
But the latter is going to block your app until selected again. If you need stuff to happen in the background, you'll have to spawn a detached thread to do it.
Posted by: tfabris
Re: How to give display back to the player - 22/08/2005 19:57
That reads more like a suggestion than a patch.
Fortunately, Mark has occasionally been known to listen to suggestions, too.
Posted by: tonyc
Re: How to give display back to the player - 22/08/2005 21:43
No, I get what he's saying. Your #define solution would break the existing WAITMENU ioctl. He wants a separate ioctl() for this particular situation. I just don't think it's that confusing as-is, so I'm not doing it.