diff options
author | Kjell Ericson <kjell@haxx.se> | 2003-01-29 11:48:35 +0000 |
---|---|---|
committer | Kjell Ericson <kjell@haxx.se> | 2003-01-29 11:48:35 +0000 |
commit | 9d40f7ebc4270fec50211da80f19d7ba1da6b841 (patch) | |
tree | ac5f8b0954cb313f18e6c9e12a3136b8891dbf4f /firmware/drivers/lcd-player.c | |
parent | fc69875d56a09f112f1746846e3a38fa207f5842 (diff) | |
download | rockbox-9d40f7ebc4270fec50211da80f19d7ba1da6b841.tar.gz rockbox-9d40f7ebc4270fec50211da80f19d7ba1da6b841.zip |
Player changes: Added lcd_remove_cursor() and updated the cursor functionality.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3182 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd-player.c')
-rw-r--r-- | firmware/drivers/lcd-player.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/firmware/drivers/lcd-player.c b/firmware/drivers/lcd-player.c index a03b1b024c..bac18d28c8 100644 --- a/firmware/drivers/lcd-player.c +++ b/firmware/drivers/lcd-player.c | |||
@@ -315,14 +315,25 @@ void lcd_puts(int x, int y, unsigned char *string) | |||
315 | 315 | ||
316 | void lcd_put_cursor(int x, int y, char cursor_char) | 316 | void lcd_put_cursor(int x, int y, char cursor_char) |
317 | { | 317 | { |
318 | cursor.text[0]=buffer_xlcd[x][y]; | 318 | if (cursor.len==0) { |
319 | cursor.text[1]=cursor_char; | 319 | cursor.text[0]=buffer_xlcd[x][y]; |
320 | cursor.len=2; | 320 | cursor.text[1]=cursor_char; |
321 | cursor.textpos=0; | 321 | cursor.len=2; |
322 | cursor.y_pos=y; | 322 | cursor.textpos=0; |
323 | cursor.x_pos=x; | 323 | cursor.y_pos=y; |
324 | cursor.downcount=0; | 324 | cursor.x_pos=x; |
325 | cursor.divider=4; | 325 | cursor.downcount=0; |
326 | cursor.divider=4; | ||
327 | } | ||
328 | } | ||
329 | |||
330 | void lcd_remove_cursor(void) | ||
331 | { | ||
332 | if (cursor.len!=0) { | ||
333 | cursor.len=0; | ||
334 | if (lcdx_putc(cursor.x_pos, cursor.y_pos, cursor.text[0])) | ||
335 | lcd_update(); | ||
336 | } | ||
326 | } | 337 | } |
327 | 338 | ||
328 | void lcd_putc(int x, int y, unsigned short ch) | 339 | void lcd_putc(int x, int y, unsigned short ch) |