add relative left mouse button when pointer device is not abs

This commit is contained in:
grant2258 2021-10-16 19:26:40 +01:00
parent a9125fffaa
commit a68e5205bd

View File

@ -45,7 +45,7 @@
#include <sys/event.h>
#endif
#include <poll.h>
//#undef HAVE_X11
#include <libudev.h>
#if defined(__linux__)
#include <linux/types.h>
@ -1028,9 +1028,11 @@ static int16_t udev_pointer_state(udev_input_t *udev,
case RETRO_DEVICE_ID_POINTER_Y:
return udev_mouse_get_pointer_y(mouse, screen);
case RETRO_DEVICE_ID_POINTER_PRESSED:
return mouse->pp;
if(mouse->x_min < mouse->x_max)
return mouse->pp;
else
return mouse->l;
}
return 0;
}