summaryrefslogtreecommitdiff
path: root/apps/gui/line.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-01-12 01:50:21 +0100
committerThomas Martitz <kugel@rockbox.org>2014-01-12 01:50:21 +0100
commit0a0d61e777c47d742be195dd9c661065be0eb7da (patch)
treefdb9660885991731d0122f74395a8b7a677c8123 /apps/gui/line.c
parent488a1b983e1c2fac14de25aa781caf12628e53c8 (diff)
downloadrockbox-0a0d61e777c47d742be195dd9c661065be0eb7da.tar.gz
rockbox-0a0d61e777c47d742be195dd9c661065be0eb7da.zip
Fix remote warnings and charcell reds, and remove minor left-over tuff.
Change-Id: I10987ea9fcad94d502afd4ae4a80ab9022c75d2e
Diffstat (limited to 'apps/gui/line.c')
-rw-r--r--apps/gui/line.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/apps/gui/line.c b/apps/gui/line.c
index e2eb6f277b..fe017970e6 100644
--- a/apps/gui/line.c
+++ b/apps/gui/line.c
@@ -53,18 +53,15 @@ static void put_text(struct screen *display, int x, int y, struct line_desc *lin
53struct line_desc_scroll { 53struct line_desc_scroll {
54 struct line_desc desc; /* must be first! */ 54 struct line_desc desc; /* must be first! */
55 bool used; 55 bool used;
56}; 56} lines[MAX_LINES];
57
58#define NOINLINE __attribute__ ((noinline))
59 57
60struct line_desc_scroll *get_line_desc(void) NOINLINE; 58static struct line_desc_scroll *get_line_desc(void)
61struct line_desc_scroll *get_line_desc(void)
62{ 59{
63 static struct line_desc_scroll lines[MAX_LINES];
64 static unsigned line_index; 60 static unsigned line_index;
65 struct line_desc_scroll *this; 61 struct line_desc_scroll *this;
66 62
67 do { 63 do
64 {
68 this = &lines[line_index++]; 65 this = &lines[line_index++];
69 if (line_index >= ARRAYLEN(lines)) 66 if (line_index >= ARRAYLEN(lines))
70 line_index = 0; 67 line_index = 0;
@@ -87,7 +84,6 @@ static void scroller(struct scrollinfo *s, struct screen *display)
87 line->used = false; 84 line->used = false;
88 } 85 }
89 else 86 else
90 if (s->line)
91 { 87 {
92 style_line(display, s->x, s->y - (line->desc.height/2 - display->getcharheight()/2), &line->desc); 88 style_line(display, s->x, s->y - (line->desc.height/2 - display->getcharheight()/2), &line->desc);
93 put_text(display, s->x, s->y, &line->desc, s->line, true, s->offset); 89 put_text(display, s->x, s->y, &line->desc, s->line, true, s->offset);