summaryrefslogtreecommitdiffstats
path: root/apps/logfdisp.c
diff options
context:
space:
mode:
authorMichiel Van Der Kolk <not.valid@email.address>2005-06-30 15:14:08 +0000
committerMichiel Van Der Kolk <not.valid@email.address>2005-06-30 15:14:08 +0000
commit65ff219e8e1133469750ca4d806d8f3b2cede442 (patch)
tree6cd8eb09442c83da35019a4de035c847f5586f4b /apps/logfdisp.c
parentb371cbb39ef6a1f9da32a9d8f7d6f12b1d8077b6 (diff)
downloadrockbox-65ff219e8e1133469750ca4d806d8f3b2cede442.tar.gz
rockbox-65ff219e8e1133469750ca4d806d8f3b2cede442.tar.bz2
rockbox-65ff219e8e1133469750ca4d806d8f3b2cede442.zip
better logf stuff..
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6948 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/logfdisp.c')
-rw-r--r--apps/logfdisp.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/apps/logfdisp.c b/apps/logfdisp.c
index 2858fba566..2cfec2feb9 100644
--- a/apps/logfdisp.c
+++ b/apps/logfdisp.c
@@ -36,6 +36,7 @@ bool logfdisplay(void)
{
int w, h;
int lines;
+ int columns;
int i;
int button;
@@ -50,6 +51,14 @@ bool logfdisplay(void)
0
#endif
:LCD_HEIGHT)/h;
+ columns = (lcd?
+#ifdef HAVE_REMOTE_LCD
+ LCD_REMOTE_WIDTH
+#else
+ 0
+#endif
+ :LCD_WIDTH)/w;
+
if(!lines)
return false;
@@ -59,7 +68,7 @@ bool logfdisplay(void)
do {
index = logfindex;
for(i = lines-1; i>=0; i--) {
- unsigned char buffer[MAX_LOGF_ENTRY + 1];
+ unsigned char buffer[columns + 1];
if(--index < 0) {
if(logfwrap)
@@ -68,8 +77,8 @@ bool logfdisplay(void)
break; /* done */
}
- memcpy(buffer, logfbuffer[index], MAX_LOGF_ENTRY);
- buffer[MAX_LOGF_ENTRY]=0;
+ memcpy(buffer, logfbuffer[index], columns);
+ buffer[columns]=0;
lcd_puts(0, i, buffer);
}
lcd_update();