...and for sdl1.

This commit is contained in:
William McBrine
2019-08-25 17:23:38 -04:00
parent 3ed1d77019
commit 563e71caed

View File

@@ -256,8 +256,8 @@ static int _process_mouse_event(void)
{
int i;
SP->mouse_status.x = event.motion.x / pdc_fwidth;
SP->mouse_status.y = event.motion.y / pdc_fheight;
SP->mouse_status.x = (event.motion.x - pdc_xoffset) / pdc_fwidth;
SP->mouse_status.y = (event.motion.y - pdc_yoffset) / pdc_fheight;
if (!event.motion.state ||
(SP->mouse_status.x == old_mouse_status.x &&
@@ -326,8 +326,8 @@ static int _process_mouse_event(void)
}
}
SP->mouse_status.x = event.button.x / pdc_fwidth;
SP->mouse_status.y = event.button.y / pdc_fheight;
SP->mouse_status.x = (event.button.x - pdc_xoffset) / pdc_fwidth;
SP->mouse_status.y = (event.button.y - pdc_yoffset) / pdc_fheight;
btn--;