diff options
author | Marvin Borner | 2019-11-05 22:26:27 +0100 |
---|---|---|
committer | Marvin Borner | 2019-11-05 22:26:27 +0100 |
commit | b8b094e45ecaa7876e02e5ada246ae13e57dfe07 (patch) | |
tree | 99a32122bbea261602299cb2e85fcf45926c66c3 /src/kernel/graphics/vesa.c | |
parent | 2180357ff5edbd4c85e125ea5c45d9b2a2026944 (diff) |
Added basic PS/2 mouse support
Diffstat (limited to 'src/kernel/graphics/vesa.c')
-rw-r--r-- | src/kernel/graphics/vesa.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/graphics/vesa.c b/src/kernel/graphics/vesa.c index 639ec2b..eb70583 100644 --- a/src/kernel/graphics/vesa.c +++ b/src/kernel/graphics/vesa.c @@ -341,6 +341,14 @@ void vesa_draw_number(int n) { vesa_draw_string(itoa(n, string)); } +void vesa_draw_cursor(int x, int y) { + if (x < 0) x = 0; + if (y < 0) y = 0; + if (x > vbe_width - 1) x = vbe_width - 1; + if (y > vbe_height - 1) y = vbe_height - 1; + vesa_draw_rectangle(x, y, x + font_width, y + font_height, terminal_color); +} + void vesa_set_color(uint32_t color) { vesa_convert_color(terminal_color, color); vesa_convert_color(terminal_background, default_background_color); |