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: half-idea for #ifdef and key deifnition hell...

Re: half-idea for #ifdef and key deifnition hell...

From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Mon, 29 May 2006 13:30:11 +1000

hey all,
well iv had another play with this and i tinhk it actually works :O
attached is a demo plugin that just tests the loop.. hopefully its all
simple enough to understand without thinking too much..
the idea of line 12-35 is that there would be a standard list of
buttons that would be global so the button list would really only ever
really need to be coded again is if some wierd combo u want isnt in
the main list..
as u can see. the code easily handles short/long presses of both
individual buttons and combo's. fancy stuff like quick double press
and short then long press would need to be done after the call.. but
that doesnt happen very often so thats no big deal..
also, ive only tested this in the sim so i dont know how responsive it
feels on the actual player.. (if the attachment doesnt work iv put it
at http://members.optusnet.com.au/jdgordy/button_test.c )

On 24/03/06, Jonathan Gordon <jdgordy_at_gmail.com> wrote:
> On 24/03/06, Brandon Low <lostlogic_at_lostlogicx.com> wrote:
> > Yer a smart one.
> :)
> >
> > I hoep you keep noodling on this while we're all busy doing 3.0 :)
> ye, thats why im playing with it.. figured i may aswell do something
> while everyone else is getting ready for 3.0
>
> >
> > On Fri, 03/24/06 at 12:08:47 +1100, Jonathan Gordon wrote:
> > > maybe we do a simple last button cache thing?
> > > i.e if button == last_button then start the loop at the last i..
> > > of, even just cache the last return_code and return that imediatly.. i
> > > think that would work?
> > >
> > > On 24/03/06, Brandon Low <lostlogic_at_lostlogicx.com> wrote:
> > > > Scroll events happen frequently enough to be worth concern, as do
> > > > button_repeat events...
> > > >
> > > > Darn those remote controls.
> > > >
> > > > Brandon
> > > >
> > > > On Thu, 03/23/06 at 14:45:07 +0100, Bj?rn Stenberg wrote:
> > > > > Brandon Low wrote:
> > > > > > I think that button processing can't be going through lists like that,
> > > > > > too slow.
> > > > >
> > > > > I'm not so sure. Buttons are pressed rather rarely (from a system/cpu point of view) and the lag cause by looping through a few dozen entries will probably not be measurable, let alone noticeable.
> > > > >
> > > > > The case for using variable button mapping is mainly driven by the fact that irivers can have several different remote controls, and change between then in runtime. Handling that requires more flexibility than #defines can provide.
> > > > >
> > > > > --
> > > > > Bj?rn
> > > >
> >
>

Received on 2006-05-29

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy