Skip to content

Commit

Permalink
Fix absRange for PLATFORM_DRM
Browse files Browse the repository at this point in the history
  • Loading branch information
ubkp committed Nov 7, 2023
1 parent 580fbf4 commit 4f6da48
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/platforms/rcore_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
}
}

Expand Down

0 comments on commit 4f6da48

Please sign in to comment.