Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: Configurable buttons; was: Re: button changes from devcon, someone play evil dictator

Re: Configurable buttons; was: Re: button changes from devcon, someone play evil dictator

From: Tapio Kelloniemi <spammi.helevetti_at_nbl.fi>
Date: Fri, 8 Jun 2007 15:04:44 +0300

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
Received on 2007-06-08

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa