summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/line.c12
-rw-r--r--apps/plugin.h2
2 files changed, 5 insertions, 9 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);
diff --git a/apps/plugin.h b/apps/plugin.h
index 5d6527d7a4..8a0d0562ff 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -326,7 +326,7 @@ struct plugin_api {
326 void (*lcd_remote_set_contrast)(int x); 326 void (*lcd_remote_set_contrast)(int x);
327 void (*lcd_remote_clear_display)(void); 327 void (*lcd_remote_clear_display)(void);
328 void (*lcd_remote_puts)(int x, int y, const unsigned char *string); 328 void (*lcd_remote_puts)(int x, int y, const unsigned char *string);
329 void (*lcd_remote_puts_scroll)(int x, int y, const unsigned char* string); 329 bool (*lcd_remote_puts_scroll)(int x, int y, const unsigned char* string);
330 void (*lcd_remote_scroll_stop)(void); 330 void (*lcd_remote_scroll_stop)(void);
331 void (*lcd_remote_set_drawmode)(int mode); 331 void (*lcd_remote_set_drawmode)(int mode);
332 int (*lcd_remote_get_drawmode)(void); 332 int (*lcd_remote_get_drawmode)(void);