Skip to content

Commit

Permalink
Update ft2_mouse.c
Browse files Browse the repository at this point in the history
  • Loading branch information
8bitbubsy committed Mar 18, 2024
1 parent 9a4417b commit 222085f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ft2_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,9 @@ void readMouseXY(void)
my -= video.renderY;
}

// this can happen...
if (mx < 0) mx = 0;
if (my < 0) my = 0;
// kludge: this can happen and prevent buttons from pressing on the very first row of pixels
if (mx == -1) mx = 0;
if (my == -1) my = 0;

// multiply coords by video upscaling factors
mouse.x = (int32_t)floor(mx * video.dMouseXMul);
Expand Down

0 comments on commit 222085f

Please sign in to comment.