aboutsummaryrefslogtreecommitdiff
path: root/sdl.c
diff options
context:
space:
mode:
Diffstat (limited to 'sdl.c')
-rw-r--r--sdl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sdl.c b/sdl.c
index edd173e06c..1509397f10 100644
--- a/sdl.c
+++ b/sdl.c
@@ -312,8 +312,8 @@ static void sdl_send_mouse_event(int dz)
}
SDL_GetMouseState(&dx, &dy);
- dx = dx * 0x7FFF / width;
- dy = dy * 0x7FFF / height;
+ dx = dx * 0x7FFF / (width - 1);
+ dy = dy * 0x7FFF / (height - 1);
} else if (absolute_enabled) {
sdl_show_cursor();
absolute_enabled = 0;