aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;