summaryrefslogtreecommitdiff
path: root/payloads/libpayload
diff options
context:
space:
mode:
authorPatrick Georgi <patrick.georgi@coresystems.de>2008-09-11 17:44:45 +0000
committerPatrick Georgi <patrick.georgi@coresystems.de>2008-09-11 17:44:45 +0000
commit53bbb0f6b1bd96a7ad8c5cd0d45e0b2705704f6d (patch)
treef100eda55e332a01b40212bc886c06c1dffc2ebb /payloads/libpayload
parent29061a59b2b09c0896a53c9208199feecb432225 (diff)
makes cursorx and cursory signed, as there
are several "if (cursorx < 0)" tests. I also added another one, to make backspace wrap backwards into the previous line, if necessary. Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Jordan Crouse <jordan.crouse@amd.com> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3576 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/libpayload')
-rw-r--r--payloads/libpayload/drivers/video/video.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 78f410be34..23d0c1bb58 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -51,8 +51,8 @@ static struct video_console *console_list[] =
static struct video_console *console;
-static unsigned int cursorx;
-static unsigned int cursory;
+static int cursorx;
+static int cursory;
static unsigned int cursor_enabled = 1;
static void video_console_fixup_cursor(void)
@@ -122,6 +122,10 @@ void video_console_putchar(unsigned int ch)
case '\b':
cursorx--;
+ if (cursorx < 0) {
+ cursory--;
+ cursorx = VIDEO_COLS;
+ }
break;
case '\t':
@@ -172,7 +176,7 @@ int video_console_init(void)
console = console_list[i];
if (console->get_cursor)
- console->get_cursor(&cursorx, &cursory, &cursor_enabled);
+ console->get_cursor((unsigned int*)&cursorx, (unsigned int*)&cursory, &cursor_enabled);
if (cursorx) {
cursorx = 0;