Rockbox

Tasklist

FS#4962 - Backlight in plugins

Attached to Project: Rockbox
Opened by Ben Dixon (Snappy) - Thursday, 30 March 2006, 18:45 GMT
Task Type Patches
Category Plugins
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

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)
This task depends upon

Closed by  Nils Wallménius (nls)
Sunday, 09 July 2006, 13:52 GMT
Reason for closing:  Out of Date
Comment by Ben Dixon (Snappy) - Thursday, 30 March 2006, 20:34 GMT
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.
Comment by Paul van der Heu (paulheu) - Thursday, 30 March 2006, 21:34 GMT
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;
+ }
Comment by Ben Dixon (Snappy) - Friday, 31 March 2006, 09:16 GMT
Of course! Thanks :)
Here's the updated patch
(All plugins work now AFAIK)
(application/octet-stream)    patch (127.9 KiB)
Comment by Ben Dixon (Snappy) - Friday, 31 March 2006, 10:01 GMT
Ooops! Doom wasn't included in the patch
Third time lucky?
(application/octet-stream)    patch (129.5 KiB)
Comment by Zakk Roberts (midkay) - Friday, 31 March 2006, 17:54 GMT
Hi,

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

Zakk
Comment by Dave Chapman (linuxstb) - Saturday, 01 April 2006, 00:41 GMT
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.
Comment by Paul van der Heu (paulheu) - Saturday, 01 April 2006, 08:42 GMT
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..' ;)
Comment by Paul van der Heu (paulheu) - Saturday, 01 April 2006, 08:45 GMT
oeps.. :)
Comment by Paul van der Heu (paulheu) - Saturday, 01 April 2006, 10:58 GMT
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)
Comment by Ben Dixon (Snappy) - Wednesday, 31 May 2006, 18:31 GMT
This patch has been taken on/improved upon by Paulheu so this one can be closed :) ta

Loading...