On Fri, Jun 08, 2007 at 07:42:37AM -0400, B. Keroack wrote: > On Fri, 2007-06-08 at 10:33 +0300, Tapio Kelloniemi wrote: > > > MENU+UP = ... > > ERROR: Invalid key combination, see Manual for details. > > If the hardware doesn't support the combination, there's no way to > trigger an error message.
I have never read a single line of Rockbox code, so I don't know about the names, but something like this could work: #ifdef IRIVER_H1x0 if (modifier_key != BUTTON_ON) { fprintf (stderr, "Invalid key combination.\n"); return -1; } #elif SOME_OTHER_PLATFORM /* ... */ #else /* Every combination possible */ /* ... Ä/ #endif Not very modular though, but you probably understood. -- Tapio