1
0
Fork 0
forked from len0rd/rockbox

LCD scrolling - reduce one 'if' nesting level

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23125 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomer Shalev 2009-10-12 04:29:47 +00:00
parent aee6901953
commit 461903d80e

View file

@ -214,6 +214,8 @@ void LCDFN(puts_offset)(int x, int y, const unsigned char *str, int offset)
void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
int style, int offset)
{
struct scrollinfo* s;
char *end;
int w, h;
if ((unsigned)y >= (unsigned)current_vp->height)
@ -229,15 +231,14 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
LCDFN(getstringsize)(string, &w, &h);
if (current_vp->width - x * 8 < w) {
if (current_vp->width - x * 8 >= w)
return;
/* prepare scroll line */
struct scrollinfo* s;
s = &LCDFN(scroll_info).scroll[LCDFN(scroll_info).lines];
s->start_tick = current_tick + LCDFN(scroll_info).delay;
s->style = style;
char *end;
memset(s->line, 0, sizeof s->line);
strcpy(s->line, string);
@ -271,7 +272,6 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
LCDFN(scroll_info).lines++;
}
}
void LCDFN(puts_scroll)(int x, int y, const unsigned char *string)
{