summaryrefslogtreecommitdiff
path: root/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2020-05-31 13:10:32 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2020-05-31 13:10:32 +0000
commit9b5ecb4b05e2f6c7a569d877660320d1c683916e (patch)
tree87a0057031cb9ca9c9f6ccda9c5dea0209261ffd /graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
parentemulators/qmc2: Prep-work for Qt 5.15; compatible with Qt 5.14 (diff)
New port graphics/tslib, touchscreen support
This is a library that handles touchscreen support, translating evdev or other input sources to events that can be consumed by other graphical toolkits. It's one of the ways to hook Qt up to a framebuffer and touchscreen, for instance. Currently has no consumers (the Qt side needs other work as well). The one patch has been submitted and accepted upstream, but there's no newer upstream release.
Diffstat (limited to 'graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8')
-rw-r--r--graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc845
1 files changed, 45 insertions, 0 deletions
diff --git a/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8 b/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
new file mode 100644
index 000000000000..861a580d841b
--- /dev/null
+++ b/graphics/tslib/files/patch-git-b80ebf565ed56be2a59b036c3b3ec5a2afd25dc8
@@ -0,0 +1,45 @@
+diff --git tools/ts_uinput.c tools/ts_uinput.c
+index 9c40bb3..912ff72 100644
+--- tools/ts_uinput.c
++++ tools/ts_uinput.c
+@@ -1,6 +1,7 @@
+ /*
+ * (C) 2017 Ginzinger electronic systems GmbH, A-4952 Weng im Innkreis
+ *
++ * Adriaan de Groot <adridg@FreeBSD.org> 2020-04-15
+ * Martin Kepplinger <martin.kepplinger@ginzinger.com> 2016-09-14
+ * Melchior FRANZ <melchior.franz@ginzinger.com> 2015-09-30
+ *
+@@ -361,6 +362,23 @@ static int send_touch_events(struct data_t *data, struct ts_sample_mt **s,
+
+ static int get_abs_max_fb(struct data_t *data, int *max_x, int *max_y)
+ {
++#ifdef __FreeBSD__
++ struct fbtype fbinfo;
++
++ if (ioctl(data->fd_fb, FBIOGTYPE, &fbinfo) < 0) {
++ perror("ioctl FBIOGTYPE");
++ return errno;
++ }
++
++ if ((fbinfo.fb_width == 0) || (fbinfo.fb_height == 0)) {
++ /* Bogus w/h, guess something */
++ *max_x = 320 - 1;
++ *max_y = 240 - 1;
++ } else {
++ *max_x = fbinfo.fb_width - 1;
++ *max_y = fbinfo.fb_height - 1;
++ }
++#else
+ struct fb_var_screeninfo fbinfo;
+
+ if (ioctl(data->fd_fb, FBIOGET_VSCREENINFO, &fbinfo) < 0) {
+@@ -370,7 +388,7 @@ static int get_abs_max_fb(struct data_t *data, int *max_x, int *max_y)
+
+ *max_x = fbinfo.xres - 1;
+ *max_y = fbinfo.yres - 1;
+-
++#endif
+ return 0;
+ }
+