From 376ec65578576f6ff955373ea68539b57d23a012 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Tue, 8 Jul 2025 16:28:37 -0400 Subject: kernel: cons: Use glyph relative pos in cons attr - Make curs_col/curs_row reference console_attr.cursor_x/cursor_y - Console cursor x/y attributes reflect x/y multiplied by glyph dimensions Signed-off-by: Ian Moffett --- sys/include/dev/cons/cons.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/include/dev/cons') diff --git a/sys/include/dev/cons/cons.h b/sys/include/dev/cons/cons.h index bc868b4..7c4e41a 100644 --- a/sys/include/dev/cons/cons.h +++ b/sys/include/dev/cons/cons.h @@ -63,14 +63,15 @@ struct cons_screen { uint32_t ncols; uint32_t ch_col; /* Current col */ uint32_t ch_row; /* Current row */ - uint32_t curs_col; /* Cursor col */ - uint32_t curs_row; /* Cursor row */ struct cons_buf *ib; /* Input buffer */ struct cons_buf **ob; /* Output buffers */ struct cons_char last_chr; struct spinlock lock; }; +#define curs_col attr.cursor_x +#define curs_row attr.cursor_y + void cons_init(void); void cons_expose(void); void cons_update_color(struct cons_screen *scr, uint32_t fg, uint32_t bg); -- cgit v1.2.3