aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2026-10-14 00:07:21 +0200
committerJavier <dev.git@javispedro.com>2026-10-14 00:07:21 +0200
commit37dcf242438b88e7dd5d98a374fb2d6fa082c118 (patch)
tree44de4aa839061502f630e1b3fd52361b5aef5bb7
parenta85cb0325f841eb17434426b9b815b9e888d8992 (diff)
downloadvbados-37dcf242438b88e7dd5d98a374fb2d6fa082c118.tar.gz
vbados-37dcf242438b88e7dd5d98a374fb2d6fa082c118.zip
fix text cursor in 320x200 modes
-rw-r--r--mousetsr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mousetsr.c b/mousetsr.c
index 68929af..1e33dc2 100644
--- a/mousetsr.c
+++ b/mousetsr.c
@@ -90,7 +90,8 @@ static void hide_text_cursor(void)
{
// Restore the character under the old position of the cursor
uint16_t __far *ch = get_video_char(&data.video_mode,
- data.cursor_pos.x / 8, data.cursor_pos.y / 8);
+ data.cursor_pos.x / (data.screen_scale.x * 8),
+ data.cursor_pos.y / (data.screen_scale.y * 8));
*ch = data.cursor_prev_char;
data.cursor_visible = false;
}
@@ -98,7 +99,8 @@ static void hide_text_cursor(void)
static void show_text_cursor(void)
{
uint16_t __far *ch = get_video_char(&data.video_mode,
- data.pos.x / 8, data.pos.y / 8);
+ data.pos.x / (data.screen_scale.x * 8),
+ data.pos.y / (data.screen_scale.y * 8));
data.cursor_prev_char = *ch;
data.cursor_pos = data.pos;
*ch = (*ch & data.cursor_text_and_mask) ^ data.cursor_text_xor_mask;