diff options
Diffstat (limited to 'apps/tree.c')
-rw-r--r-- | apps/tree.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/apps/tree.c b/apps/tree.c index 53a4054ed2..822172a30c 100644 --- a/apps/tree.c +++ b/apps/tree.c | |||
@@ -66,6 +66,7 @@ void browse_root(void) | |||
66 | #define LINE_Y 0 /* Y position the entry-list starts at */ | 66 | #define LINE_Y 0 /* Y position the entry-list starts at */ |
67 | #define LINE_X 2 /* X position the entry-list starts at */ | 67 | #define LINE_X 2 /* X position the entry-list starts at */ |
68 | #define LINE_HEIGTH 8 /* pixels for each text line */ | 68 | #define LINE_HEIGTH 8 /* pixels for each text line */ |
69 | #define CURSOR_CHAR "-" | ||
69 | 70 | ||
70 | extern unsigned char bitmap_icons_6x8[LastIcon][6]; | 71 | extern unsigned char bitmap_icons_6x8[LastIcon][6]; |
71 | 72 | ||
@@ -76,6 +77,12 @@ extern unsigned char bitmap_icons_6x8[LastIcon][6]; | |||
76 | #define LINE_Y 0 /* Y position the entry-list starts at */ | 77 | #define LINE_Y 0 /* Y position the entry-list starts at */ |
77 | #define LINE_X 1 /* X position the entry-list starts at */ | 78 | #define LINE_X 1 /* X position the entry-list starts at */ |
78 | 79 | ||
80 | #ifdef HAVE_NEW_CHARCELL_LCD | ||
81 | #define CURSOR_CHAR "\x7e" | ||
82 | #else | ||
83 | #define CURSOR_CHAR "\x89" | ||
84 | #endif | ||
85 | |||
79 | #endif /* HAVE_LCD_BITMAP */ | 86 | #endif /* HAVE_LCD_BITMAP */ |
80 | 87 | ||
81 | static int compare(const void* e1, const void* e2) | 88 | static int compare(const void* e1, const void* e2) |
@@ -182,7 +189,7 @@ bool dirbrowse(char *root) | |||
182 | if (numentries == -1) | 189 | if (numentries == -1) |
183 | return -1; /* root is not a directory */ | 190 | return -1; /* root is not a directory */ |
184 | 191 | ||
185 | lcd_puts(0, dircursor, "-"); | 192 | lcd_puts(0, dircursor, CURSOR_CHAR); |
186 | #ifdef HAVE_LCD_BITMAP | 193 | #ifdef HAVE_LCD_BITMAP |
187 | lcd_update(); | 194 | lcd_update(); |
188 | #endif | 195 | #endif |
@@ -217,7 +224,7 @@ bool dirbrowse(char *root) | |||
217 | else | 224 | else |
218 | start = dircursor = 0; | 225 | start = dircursor = 0; |
219 | numentries = showdir(currdir, start); | 226 | numentries = showdir(currdir, start); |
220 | lcd_puts(0, LINE_Y+dircursor, "-"); | 227 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
221 | } | 228 | } |
222 | else | 229 | else |
223 | mpeg_stop(); | 230 | mpeg_stop(); |
@@ -254,7 +261,7 @@ bool dirbrowse(char *root) | |||
254 | } | 261 | } |
255 | 262 | ||
256 | numentries = showdir(currdir, start); | 263 | numentries = showdir(currdir, start); |
257 | lcd_puts(0, LINE_Y+dircursor, "-"); | 264 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
258 | break; | 265 | break; |
259 | 266 | ||
260 | #ifdef HAVE_RECORDER_KEYPAD | 267 | #ifdef HAVE_RECORDER_KEYPAD |
@@ -265,14 +272,14 @@ bool dirbrowse(char *root) | |||
265 | if(dircursor) { | 272 | if(dircursor) { |
266 | lcd_puts(0, LINE_Y+dircursor, " "); | 273 | lcd_puts(0, LINE_Y+dircursor, " "); |
267 | dircursor--; | 274 | dircursor--; |
268 | lcd_puts(0, LINE_Y+dircursor, "-"); | 275 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
269 | lcd_update(); | 276 | lcd_update(); |
270 | } | 277 | } |
271 | else { | 278 | else { |
272 | if (start) { | 279 | if (start) { |
273 | start--; | 280 | start--; |
274 | numentries = showdir(currdir, start); | 281 | numentries = showdir(currdir, start); |
275 | lcd_puts(0, LINE_Y+dircursor, "-"); | 282 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
276 | } | 283 | } |
277 | } | 284 | } |
278 | break; | 285 | break; |
@@ -286,12 +293,12 @@ bool dirbrowse(char *root) | |||
286 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { | 293 | if(dircursor+1 < TREE_MAX_ON_SCREEN) { |
287 | lcd_puts(0, LINE_Y+dircursor, " "); | 294 | lcd_puts(0, LINE_Y+dircursor, " "); |
288 | dircursor++; | 295 | dircursor++; |
289 | lcd_puts(0, LINE_Y+dircursor, "-"); | 296 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
290 | } | 297 | } |
291 | else { | 298 | else { |
292 | start++; | 299 | start++; |
293 | numentries = showdir(currdir, start); | 300 | numentries = showdir(currdir, start); |
294 | lcd_puts(0, LINE_Y+dircursor, "-"); | 301 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
295 | } | 302 | } |
296 | } | 303 | } |
297 | break; | 304 | break; |
@@ -314,7 +321,7 @@ bool dirbrowse(char *root) | |||
314 | lcd_setfont(0); | 321 | lcd_setfont(0); |
315 | #endif | 322 | #endif |
316 | numentries = showdir(currdir, start); | 323 | numentries = showdir(currdir, start); |
317 | lcd_puts(0, LINE_Y+dircursor, "-"); | 324 | lcd_puts(0, LINE_Y+dircursor, CURSOR_CHAR); |
318 | 325 | ||
319 | break; | 326 | break; |
320 | } | 327 | } |