Rockbox Technical Forums

Support and General Use => Theming and Appearance Customization => Topic started by: anescient on October 14, 2017, 04:51:39 PM

Title: I think I fixed up BoxAmp for 3.14
Post by: anescient on October 14, 2017, 04:51:39 PM
Original post:
Quote
I had to revert back to 3.13 because I can't not have my favorite theme: http://themes.rockbox.org/index.php?themeid=1363 (http://themes.rockbox.org/index.php?themeid=1363)

In 3.14, the WPS screen completely fails; it reverts to some kind of simple default appearance.

I suspect, maybe could be, that this is where it got broken: https://git.rockbox.org/?p=rockbox.git;a=commitdiff;h=4e1c690ea7b2163f64e3ca9dc25ca69bc75ee433 (https://git.rockbox.org/?p=rockbox.git;a=commitdiff;h=4e1c690ea7b2163f64e3ca9dc25ca69bc75ee433)

I've built the theme editor and opened the BoxAmp WPS, and the preview looks kinda squirrelly, but it loads just fine. It even says, "Document Parses Successfully".

Any guesses as to what's going wrong, here?

Does Rockbox have any kind of log or debug output that could help me pinpoint exactly where in the WPS file it's choking?

Never mind, I guess.
I took one last look at it, and I found this in the WPS:
Code: [Select]
#Progress bar
%V(17,99,187,9,-)
%pb(0,0,188,9,nobar,nofill,slider,L)

I believe that was failing this test:
Code: [Select]
        pb->width = param->data.number;
        if (pb->width <= 0 || (pb->x + pb->width) > vp->width)
            return WPS_ERROR_INVALID_PARAM;

I changed the 188 to 187:
Code: [Select]
#Progress bar
%V(17,99,187,9,-)
%pb(0,0,187,9,nobar,nofill,slider,L)

... and it seems all good now. I haven't tested the hell out of it, but it does seem to work.