Skip to content

Commit

Permalink
Restore missed absolute mouse conversion. (#17343)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb authored Jan 5, 2025
1 parent 0913263 commit ab3b175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions input/drivers/udev_input.c
Original file line number Diff line number Diff line change
Expand Up @@ -800,8 +800,8 @@ static bool udev_mouse_get_pointer(const udev_input_mouse_t *mouse,
{
/* mouse coordinates are relative to the full screen; convert them
* to be relative to the viewport */
scaled_x = mouse->x_abs - mouse->x_min;
scaled_y = mouse->y_abs - mouse->y_min;
scaled_x = vp.full_width * (mouse->x_abs - mouse->x_min) / (mouse->x_max - mouse->x_min + 1);
scaled_y = vp.full_height * (mouse->y_abs - mouse->y_min) / (mouse->y_max - mouse->y_min + 1);
}
else /* mouse coords are viewport relative */
{
Expand Down

0 comments on commit ab3b175

Please sign in to comment.