PDA

View Full Version : Tiny Little PacMan Screensaver



fcm4711
2004-08-18, 14:46
Hi Kevin

Thanks. Just had a look at this function and figured
something like this. Funny thing is I stumbled over
this function when searching for a way to avoid the
custom.map approach, but I gave up, because I wanted
to CHANGE the mappings in the 'screensaver' section.
So I added a custom.map that did override this
section with the sideeffect that it applied to all
screensavers. Later I found that I can prevent this
by adding a specific section for only my screensaver,
but didn't think about addModeDefaultMapping() again.
Thank you for the hint.

Good night (at least here in Switzerland)
Felix




--- kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:

>
> Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:
>
> > Indeed.
> >
> > Felix: How can we make it easier to install so
> that folks don't need
> > to modify their custom IR maps?
> >
>
> felix:
>
> add the following, and you dont need to add the
> custom map:
> my %mapping = ('arrow_left' => 'left',
> 'arrow_left.repeat' => 'left',
> 'arrow_right' => 'right',
> 'arrow_right.repeat' => 'right',
> 'arrow_down' => 'down',
> 'arrow_down.repeat' => 'down',
> 'arrow_up' => 'up',
> 'arrow_up.repeat' => 'up',);
> sub defaultMap { return \%mapping; }
>
Slim::Hardware::IR::addModeDefaultMapping('SCREENS AVER.tinylittlepacman',\%mapping);
>
> -kdf
>
>

kdf
2004-08-18, 14:55
You might have you double check this and how you want it to work. The reading
of the plugin will automatically add any mapping given by a defaultMap
subroutine for that plugin mode. the addDefaultMapping allows you to create a
map for an arbitrary mode. in this case, your screensaver.

further followup, we should probably take this to the dev list :)
tomorrow, of course.
-kdf

Quoting Felix Mueller <fcm4711 (AT) yahoo (DOT) com>:

> Hi Kevin
>
> Thanks. Just had a look at this function and figured
> something like this. Funny thing is I stumbled over
> this function when searching for a way to avoid the
> custom.map approach, but I gave up, because I wanted
> to CHANGE the mappings in the 'screensaver' section.
> So I added a custom.map that did override this
> section with the sideeffect that it applied to all
> screensavers. Later I found that I can prevent this
> by adding a specific section for only my screensaver,
> but didn't think about addModeDefaultMapping() again.
> Thank you for the hint.
>
> Good night (at least here in Switzerland)
> Felix
>
>
>
>
> --- kdf <slim-mail (AT) deane-freeman (DOT) com> wrote:
>
> >
> > Quoting dean blackketter <dean (AT) slimdevices (DOT) com>:
> >
> > > Indeed.
> > >
> > > Felix: How can we make it easier to install so
> > that folks don't need
> > > to modify their custom IR maps?
> > >
> >
> > felix:
> >
> > add the following, and you dont need to add the
> > custom map:
> > my %mapping = ('arrow_left' => 'left',
> > 'arrow_left.repeat' => 'left',
> > 'arrow_right' => 'right',
> > 'arrow_right.repeat' => 'right',
> > 'arrow_down' => 'down',
> > 'arrow_down.repeat' => 'down',
> > 'arrow_up' => 'up',
> > 'arrow_up.repeat' => 'up',);
> > sub defaultMap { return \%mapping; }
> >
>
Slim::Hardware::IR::addModeDefaultMapping('SCREENS AVER.tinylittlepacman',\%mapping);
> >
> > -kdf
> >
> >