Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by Snappy - 2006-03-30

FS#4962 - Backlight in plugins

Sets the backlight to be always on while plugin is running.
Changes made to:
bubbles, clock, cube, demystify, dice, dict, euroconverter, flipit, jackpot, jewels, jpeg, logo, mandelbrot, minesweeper, mosaique, nim, pong, rockblox, sliding puzzle, snake2, snake, snow, sokoban, solitaire, star, stats, stopwatch, sudoku, vu_meter, wormlet, bounce, calculator, calender, chessclock, rockdoom

(application/octet-stream)    patch (125.8 KiB)
Closed by  nls
2006-07-09 13:52
Reason for closing:  Out of Date

I’ve discovered that some plugins fail when using this patch:
cube, clock, star, vu_meter, wormlet, calculator, flippit, mandelbrot, slidingpuzzle, sokoban, stopwatch
(they quit immediately or on first button press)
I’m trying to find out why, but i’m not really sure whats causing it.

Where it goes wrong is at the USB connected case..:

+ /* Set backlight timeout back to user setting */
+ rb→backlight_set_timeout (rb→global_settings→backlight_timeout);

                   return PLUGIN_USB_CONNECTED;

should be:

+ {
+ /* Set backlight timeout back to user setting */
+ rb→backlight_set_timeout (rb→global_settings→backlight_timeout);

                   return PLUGIN_USB_CONNECTED;

+ }

Of course! Thanks :)
Here’s the updated patch
(All plugins work now AFAIK)

(application/octet-stream)    patch (127.9 KiB)

Ooops! Doom wasn’t included in the patch
Third time lucky?

(application/octet-stream)    patch (129.5 KiB)

Hi,

(my) clock plugin actually has a backlight option in the menus. Off, RB (rockbox timeout), and ON. No need to patch it. :)

Zakk

If you look at your patch, you’ll notice that it makes a LOT of unrelated changes (to whitespace afaics) in the files. I can only assume this your editor cleaning the files, but it doesn’t help make it clear what you’ve changed.

Also, not everyone will want the backlight constantly enabled in all the plugins. An alternative approach could be to add a global option “Backlight in plugins (e.g. on/off/rb timeout)”, which could be implemented in plugin.c - before and after the plugin is run.

I am trying to figure this out.. sofar I think I found how to do this in general for plugins, now if this patch is OK I’ll figure out how to make it optional through a menusetting.. I was actually thinking. ‘this cannot be that easy..’ ;)

oeps.. :)

I redid the patch so that it does not touch the global setting. If this works as it should the next step will be to make it an option which I think should be general setting/display/LCD/backlight for plugins (default|always on)

This patch has been taken on/improved upon by Paulheu so this one can be closed :) ta

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing