• Status Unconfirmed
  • Percent Complete
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by CrendKing - 2009-09-03

FS#10581 - Separate backlight setting for viewer

Hello! I made this patch to add a separate backlight setting for the viewer plugin. By default the viewer plugin use Rockbox global backlight setting. For battery life, the backlight length would be usually too short in viewer, since reading a page may take more than 10 seconds. Bring the backlight on again by pressing buttons or wheel could be painful since it may cause unwanted effects (e.g. scroll to top/bottom of the text).

I added two options: Use global setting (default) and Always on. When setting to "Use global setting", everything should remain the same as before. When setting to "Always on", the backlight should never dim off. Changing the option during reading will immediately applies effect. I use the helper functions "backlight_use_settings" and "backlight_force_on" to achieve this.

Warning: since I changed the preference struct, after installing the new viewer.rock, all previous viewer setting will be abandoned and revert to default settings. You can backup your old viewer.dat (36 bytes), wait the new viewer.dat (40 bytes) be generated, and overwrite the first 36 bytes from the old viewer.dat to restore the setting. I don't know if there is a painless way for the transition. Suggestions are welcomed.

Thank you!

   patch (2.4 KiB)

This patch is generated from the rockbox-20090903.7z, which extracts rockbox-21932 (though in the Rockbox website, it says rev 22609).

You should really use SVN if you want to do any devolping. Here is some more info on SVN:

I understand. But the firewall blocks all outbound port except 80 and 443. I cannot use the svn protocol easily. Sorry.

Just wondering why you made an enum, but don't use the enum member in the rest of the code.

Simply mimc other options, like , to make the function working. There must be some better idea, but I'm new in Rockbox dev. I'll go check if I can use some boolean like code.

Also in my own case, I found that, if there is a shortcut way to switch the two backlight mode, like pressing a button, it would be much more convenient. Sometimes I have to do something for a while when I'm reading. Keep the backlight always on is bad for battery life in this case. The quick screen does not work in viewer.

Another idea is to make a backlight mode indicator which shows in Always on mode.


Available keyboard shortcuts


Task Details

Task Editing