From 271a72f2f258d24a7cb689e5de74952a977dae4a Mon Sep 17 00:00:00 2001 From: ubkp <118854183+ubkp@users.noreply.github.com> Date: Tue, 7 Nov 2023 18:15:23 -0300 Subject: [PATCH] Fix absRange for PLATFORM_DRM (#3517) --- src/platforms/rcore_drm.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/platforms/rcore_drm.c b/src/platforms/rcore_drm.c index cb2fcd74a192..bdfc9e0f5bd4 100644 --- a/src/platforms/rcore_drm.c +++ b/src/platforms/rcore_drm.c @@ -1549,9 +1549,14 @@ static void ConfigureEvdevDevice(char *device) ioctl(fd, EVIOCGABS(ABS_X), &absinfo); worker->absRange.x = absinfo.minimum; worker->absRange.width = absinfo.maximum - absinfo.minimum; + platform.absRange.x = absinfo.minimum; + platform.absRange.width = absinfo.maximum - absinfo.minimum; + ioctl(fd, EVIOCGABS(ABS_Y), &absinfo); worker->absRange.y = absinfo.minimum; worker->absRange.height = absinfo.maximum - absinfo.minimum; + platform.absRange.y = absinfo.minimum; + platform.absRange.height = absinfo.maximum - absinfo.minimum; } // Check for multiple absolute movement support (usually multitouch touchscreens) @@ -1563,9 +1568,14 @@ static void ConfigureEvdevDevice(char *device) ioctl(fd, EVIOCGABS(ABS_X), &absinfo); worker->absRange.x = absinfo.minimum; worker->absRange.width = absinfo.maximum - absinfo.minimum; + platform.absRange.x = absinfo.minimum; + platform.absRange.width = absinfo.maximum - absinfo.minimum; + ioctl(fd, EVIOCGABS(ABS_Y), &absinfo); worker->absRange.y = absinfo.minimum; worker->absRange.height = absinfo.maximum - absinfo.minimum; + platform.absRange.y = absinfo.minimum; + platform.absRange.height = absinfo.maximum - absinfo.minimum; } }