Rockbox

This is the bug/patch tracker for Rockbox. Click here for more information.

Quick links: Bugs · Patches · Rockbox frontpage

Tasklist

FS#11588 - Conditionals with Timings

Attached to Project: Rockbox
Opened by EW (ewillner) - Tuesday, 31 August 2010, 15:09 GMT+2
Last edited by Jonathan Gordon (jdgordon) - Thursday, 02 September 2010, 13:44 GMT+2
Task Type Bugs
Category Themes
Status Closed
Assigned To No-one
Player Type Sansa e200
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Private No

Details

This issue can be demonstrated with the following wps code:

Line 1:
%?ic<%s%al%t(6)Composer:|%t(0)>;%?iA<%s%al%t(6)Alb Artist:|%t(0)>;%?ia<%s%al%t(6)Trk Artist:|%t(0)>
Line 2:
%?ic<%s%al%t(6)%ic|%t(0)>;%?iA<%s%al%t(6)%iA|%t(0)>;%?ia<%s%al%t(6)%ia|%t(0)>

There are 3 alternating displays (the info for each is divided into 2 lines):

* Composer
* Track Artist
* Album Artist


On top of that is a conditional. The conditional says that if the tag value is blank, skip (or display for time=zero) that display.

For example if the composer tag = "abc", and there are no Track Artist or Album Artist tags, the display will be:

Composer
ABC

and there would be no alternating text (because of the conditional.

What is happening for me is that the blanks are displaying alternatively. It is as if the %t(0) tag is being displayed for a short time instead of no time at all.

In order to help diagnosis of the issue, I added ;%t(0) - 25 times at the end of one of the two lines. The two lines have always been in sync (same conditions, same timings, just different text being displayed.

The two lines were out of sync - which means to me that the ;%t(0) did add some time.

See also http://forums.rockbox.org/index.php?topic=25545.0 in the forum for a discussion of this issue.

This task depends upon

Closed by  Jonathan Gordon (jdgordon)
Thursday, 02 September 2010, 13:44 GMT+2
Reason for closing:  Fixed
Additional comments about closing:  in r27983
Comment by Jonathan Gordon (jdgordon) - Tuesday, 31 August 2010, 15:42 GMT+2
This seems to work, needs testing and cleaning up though.

Which e200 do you have? I'll do a build for oyu if you cant build your own
   fs11588.patch (3.6 KiB)
 b/apps/gui/skin_engine/skin_render.c |   78 ++++++++++++++++++++++++++---------
 1 file changed, 60 insertions(+), 18 deletions(-)

Comment by Jonathan Gordon (jdgordon) - Tuesday, 31 August 2010, 16:24 GMT+2
this one is a bit cleaner
   fs11588.patch (6.1 KiB)
 b/apps/gui/skin_engine/skin_display.c |   17 +++---
 b/apps/gui/skin_engine/skin_render.c  |   83 ++++++++++++++++++++++++----------
 2 files changed, 68 insertions(+), 32 deletions(-)

Comment by EW (ewillner) - Tuesday, 31 August 2010, 20:49 GMT+2
My e200 is a V1. I can't do a patch build, but if you send me one, I will test it.

Thanks
Comment by EW (ewillner) - Tuesday, 31 August 2010, 20:51 GMT+2
I didn't mean send - if I can download a build from somewhere, I will test it. (A simulator build will be even easier:)

Loading...