Skip to content

Commit

Permalink
Mouse: do not truncate scaled coordinates
Browse files Browse the repository at this point in the history
I'm not sure exactly why I was flooring this value, but with
osdScale != 1, it is better to leave things as floats.
  • Loading branch information
torque committed Feb 8, 2025
1 parent 4a9408f commit 021b1fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Mouse.moon
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Mouse
scaledPosition = =>
x, y = mp.get_mouse_pos!
@_rawX, @_rawY = x, y
return math.floor( x/Window.osdScale ), math.floor( y/Window.osdScale )
return x / Window.osdScale, y / Window.osdScale

@update: =>
oldX, oldY = @x, @y
Expand Down

0 comments on commit 021b1fc

Please sign in to comment.