Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Re: fredwbauer: r30826 - in trunk: apps apps/gui firmware firmware/export

Re: fredwbauer: r30826 - in trunk: apps apps/gui firmware firmware/export

From: Jonathan Gordon <jdgordy_at_gmail.com>
Date: Wed, 26 Oct 2011 00:40:28 +1100

On 26 October 2011 00:28, Thomas Martitz <kugel_at_rockbox.org> wrote:
> Am 25.10.2011 10:57, schrieb Jonathan Gordon:
>>
>> setuifont() should only be called when actually loading a new font from
>> disk. I didnt really want to add it at all so its just there for more
>> completeness.
>
> That doesn't really answer my question. Anyway, if the ui font id changes,
> you surely need to update the default vp too? i.e. call setfont() right
> after?
>
> My question is really if they need to be separate functions at all.
>

Please check the diff.... they do 2 completly different things.
setfont() is a wrapper around lcd_setfont() to make sure FONT_UI is
the correct id.
setuifont() only sets-up global_status so setfont(FONT_UI) works.

There is an argument that setuifont() must call lcd_setfont(), but if
setfont() sets global_status that would be wrong. Proof of that is
what should global_status.font_id[SCREEN_MAIN] be set to after a call
to screens[SCREEN_MAIN].setfont(FONT_UI) ?

Like I already said, lcd_setfont() (and screens.setfont()) should
probably be removed, or at least marked as deprecated)
Received on 2011-10-25


Page was last modified "Jan 10 2012" The Rockbox Crew
aaa