Fix mouse behaviour when zoom is active
This commit is contained in:
parent
3f90241e3b
commit
96e8dff73a
|
@ -118,10 +118,10 @@ poll_mouse(void) {
|
|||
if (mouse_event.type == EV_REL) {
|
||||
if (mouse_event.code == REL_X) {
|
||||
in.mouse.x = CLAMP(
|
||||
in.mouse.x / (s32)zoom + (s32)mouse_event.value, 0, (s32)screen_width);
|
||||
in.mouse.x + (s32)mouse_event.value, 0, (s32)screen_width);
|
||||
} else if (mouse_event.code == REL_Y) {
|
||||
in.mouse.y = CLAMP(
|
||||
in.mouse.y / (s32)zoom + (s32)mouse_event.value, 0, (s32)screen_height);
|
||||
in.mouse.y + (s32)mouse_event.value, 0, (s32)screen_height);
|
||||
}
|
||||
} else if (mouse_event.type == EV_ABS) {
|
||||
if (mouse_event.code == ABS_X) {
|
||||
|
|
Loading…
Reference in New Issue