diff options
author | Thomas Martitz <kugel@rockbox.org> | 2014-01-12 01:50:21 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-01-12 01:50:21 +0100 |
commit | 0a0d61e777c47d742be195dd9c661065be0eb7da (patch) | |
tree | fdb9660885991731d0122f74395a8b7a677c8123 /apps/gui/line.c | |
parent | 488a1b983e1c2fac14de25aa781caf12628e53c8 (diff) | |
download | rockbox-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.c | 12 |
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 | |||
53 | struct line_desc_scroll { | 53 | struct 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 | ||
60 | struct line_desc_scroll *get_line_desc(void) NOINLINE; | 58 | static struct line_desc_scroll *get_line_desc(void) |
61 | struct 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); |