Rockbox mail archiveSubject: Trimming the lcd api
Trimming the lcd api
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Tue, 11 Oct 2011 21:22:16 +0200
During my current adventures into android screen scaling, I have been looking into our lcd api. It was a while since I dug into it last, and I was quite intrigued to find that we now have no less than 14 lcd_puts function calls:
One of the reasons for the growth is that the api started out with line-oriented positioning and has then been expanded with pixel-oriented (xy) alternatives. I would like to stop using line oriented positioning and convert all code to pixel positions. Jonathan Gordon has already written a patch that does much of that, which I have used in my effort so far.
Going pixel-only removes some of the api proliferation, but we still have puts functions for nearly all combinations of scroll, offset and style.
I would like to condense all of our puts variants into one single function:
void lcd_puts(int x, int y, int xcrop, int style,
bool scrolled, const char* fmt, ...)
As far as I can tell, this works on the charcell Player too. It simply has two possible y positions: 0 or 1.
If you believe this change is unsuitable, I would very much appreciate hearing what I have missed or what would require special consideration.
As for time frame, this is clearly a post-3.10 change.
-- BjörnReceived on 2011-10-11
Page was last modified "Sat May 23 08:12:40 2020" The Rockbox Crew