This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#5898 - Custom Display Width for 16Bitmap LCDs
Attached to Project:
Rockbox
Opened by P.I.Julius (pijulius) - Tuesday, 29 August 2006, 17:18 GMT+1
Last edited by Jonathan Gordon (jdgordon) - Thursday, 17 April 2008, 15:03 GMT+1
Opened by P.I.Julius (pijulius) - Tuesday, 29 August 2006, 17:18 GMT+1
Last edited by Jonathan Gordon (jdgordon) - Thursday, 17 April 2008, 15:03 GMT+1
|
DetailsThis patch adds support for the lcd-16bit.c to define a custom width for the display, so you can have for e.g. scrolling text in a defined x/y coordinate with a defined width.
The new function is called: lcd_set_custom_width(int width) You won't see any changes if you apply this patch, it is only useful for other patches like I hope it will be helpful to those who try to make new wps-es with more freedom for art :) Bests, Julius |
This task depends upon
Closed by Jonathan Gordon (jdgordon)
Thursday, 17 April 2008, 15:03 GMT+1
Reason for closing: Out of Date
Additional comments about closing: OOD and viewports would do this anyway
Thursday, 17 April 2008, 15:03 GMT+1
Reason for closing: Out of Date
Additional comments about closing: OOD and viewports would do this anyway
Thanks a lot and all the best
Norbert
Btw: I will try to add scrolling capabilities to this patch, just I have a lot on my head (again) so it may not happen in the near future, but I really plan to do it.
Cheers,
Julius
The problem is apps/gui/gwps-common.c
I tried applying both, along with someother patches (I know what i did, i've been patching daily for 2 months now), and they cannot be both applied.
They contain different variable names and similar procedures. Trying to patch one after the other of course gave me a reject file. I fixed up /apps/gui/gwps-common.c, replacing some code applied by this patch with that of the scroll margins patch.
In trying to build rockbox for my 5G ipod with Cygwin, after about 30 lines, i came up with three errors.
I just forgot to take them down...sorry :(
Anyway, i hope that scroll margins can be done somehow, either by fixing up one of these two patches, or by adding that feature to this patch, as you wish P.I.Julius
If you also applied the scroll_margins patch
Most of the times the scroll_margin patch has replaced LCD_WIDTH
already with e.g. rightmargin
So your changes to use lcd_get_custom_width() instead of LCD_WIDTH
will conflict even if the patch would apply IMHO
I do builds for X5 for some people from the audiophile.net forums
and they literally begging to include your patch :-)
And yes if your patch does also scrolling I would be very happy :-)
Happy to hear that the patches are usable, and I really hope I will be able to implement scrolling for the customline.patch in the next weeks.
Cheers,
Julius
How can I test the new features of your patch?
(I am not a wps expert and writer :-))
I only have a X5 and the simulator
Would it be possible for one of you to create a patch which applies on top of the scroll_margins patch?
People ask for the inclusion of these patches into my H300 builds, and I wouldn't mind.
Thanks a lot and all the best
Norbert
Thanks a lot for your help on this!
Regarding your question: "How can I test the new features of your patch?" it depends, what patches did you apply to your source? I'm asking because this patch only adds a function do define a custom width for the screen, but you have to use it to see some result :) for e.g. see customline patch (#5900) or customlistwidth patch (#5899). I hope this will help you to understand what it does and how to use it.
Cheers,
Julius
Since I have only a X5 I cannot use customlistwidth right?
I have also applied customline and read the description there
So I only need to use some %e in my wps?
I was hoping to get some ready wps that makes testing easier :-)
I cannot use the jClix theme on X5 right?
Please check if it still doing the right thing :-)
Thanks a lot, I am a bit further on. Now it breaks in the customline patch, as it adds a line:
display->setmargins(data->line_xpos, data->line_ypos);
in gwps-common.c. I tried to fix it but didn't find any trivial solution (although it might exist).
I used the following patches:
custom_display_width-scroll_margins
custom_list_position
customline
multifont-20060828
multifont-userfonts-20060828
So if you have any idea, let me know, otherwise I just dump it until we can replace the scrollmargins with the custom_* stuff.
Thanks a lot and all the best
Norbert
display->setmargins(data->line_xpos, data->line_xpos+data->line_width, data->line_ypos);
I hope this is correct
Thanks. It does no compile. Testing will follow soon.
BTW: Do you use/patch also the custom_font patches? What did you do with the FONT_UI stuff which was undefined ...?
Bye
Norbert
Just look in the file font.h line 72 and use the appropriate from the enums
I finally got it to compile with all the patches by replacing FONT_UI several times. But loading the stuff onto my H340 I got in IOO or something at rockbox loading time. Pity.
I have no more time currently, so no more builds trying. It is all probably too many patches mixed together.
Thanks anyway
Norbert
If it is a combination, it is smaller than either of the patches.
If it is an addition, in what other am I to then apply the three patches for best results and least hastle (meaning the least amount of code to manually add in due to rejections).
scroll_margins patch. You need to apply scroll_margins before!
It is smaller because both patches do very similar things
BTW: a wps should NOT use both scroll_margins AND custom_display_width
scroll_margins patch
custom_display_width-scroll_margins patch
custom_display_width
I'll try it out...
If i get problems then i have to do it in the reverse order...
to reverse just use patch -R
bits = font_get_bits(pf, ch,curfont);
to
bits = font_get_bits(pf, ch);
Apparently, if ,curfont is removed, trying to make the source fails. Thought I'd point this out.
But I dont found a change that you described above
in both custom_display_width.patch and custom_display_width-scroll_margins.patch
it looks like a change from the mutlifont patch
scroll_margins_20060829.patch
custom_display_width-scroll_margins.patch
multifont-20060828.patch
multifont-userfonts-20060828.patch
customline.patch
custom_list_position.patch
and i get a couple of errors when trying to compile for my 5G.
I'll try another build tonight and post the errors
Using Cygwin and make a build for my 5G using rockbox source of 2006/09/16, and using only the following pacthes in that order :-
scroll_margins_20060829.patch
custom_display_width-scroll_margins.patch
multifont-20060828.patch
multifont-userfonts-20060828.patch
customline.patch
custom_list_position.patch
... I got the following errors :-
gui/gwps-common.c: In function 'format_display':
gui/gwps-common.c:1361: warning: implicit declaration of function 'hex_to_rgb'
CC gui/icon.c
CC gui/list.c
CC gui/logo.c
CC gui/option_select.c
CC gui/quickscreen.c
CC gui/scrollbar.c
CC gui/splash.c
CC gui/statusbar.c
gui/statusbar.c: In function 'gui_statusbar_draw':
gui/statusbar.c:152: error: 'struct screen' has no member named 'getxmargin'
make[1]: *** [/home/rockbox-src/build/apps/gui/statusbar.o] Error 1
make: *** [all] Error 2
Which pacth(s) is causing this?
NOTE :- parts of multifont-20060828.patch & customline.patch had to be applied manually since reject files were created.
First of al you shouldn't apply these patches together with the scrolling_margins patch because they dont seem to work.
Second: your problem is related to custom_list_position wich changes the statusbar.c, just replace the display->getxmargin with lcd_getxmargin and it should work.
Cheers,
Julius
I apply all of those cause i want all the features, and actually thats just 1/4 of all the pacthes i usually apply.
but you must not use both in the same WPS
All my scroll_margin WPS works fine and also
the WPS that use this patch together with customline work
I think the whole set of custom/multi stuff slowly needs a rehaul. The settings code has changed significantly.
Max, can you do this, and IF you do, can you upload your current versions to the tracker.
Thanks a lot and all the best
Norbert
Sorry I have currently very limited time for RB.
Give me some days.
Max
In file included from powermgmt.c:38:
export/lcd.h:309:20: error: #if with no expression
make[1]: *** [/home/crispy/rockbox/ipod/firmware/powermgmt.o] Error 1
Gets this error with current SVN
Same build date as the multifont rewrite of maxwen.
Sacha (Angryman)