summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/drivers/video/video.c7
-rw-r--r--payloads/libpayload/include/libpayload.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c
index 4cd630751a..87d7d7424c 100644
--- a/payloads/libpayload/drivers/video/video.c
+++ b/payloads/libpayload/drivers/video/video.c
@@ -122,6 +122,13 @@ void video_console_putc(u8 row, u8 col, unsigned int ch)
console->putc(row, col, ch);
}
+void video_console_move_cursor(int x, int y)
+{
+ cursorx += x;
+ cursory += y;
+ video_console_fixup_cursor();
+}
+
void video_console_putchar(unsigned int ch)
{
if (!console)
diff --git a/payloads/libpayload/include/libpayload.h b/payloads/libpayload/include/libpayload.h
index 19ba671a5a..35f2bd735b 100644
--- a/payloads/libpayload/include/libpayload.h
+++ b/payloads/libpayload/include/libpayload.h
@@ -279,6 +279,7 @@ void video_console_clear(void);
void video_console_cursor_enable(int state);
void video_console_get_cursor(unsigned int *x, unsigned int *y, unsigned int *en);
void video_console_set_cursor(unsigned int cursorx, unsigned int cursory);
+void video_console_move_cursor(int x, int y);
/*
* print characters on video console with colors. note that there is a size
* restriction for the internal buffer. so, output string can be truncated.