summaryrefslogtreecommitdiffstats
path: root/meta/packages/xtscal/xtscal/cleanup.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/xtscal/xtscal/cleanup.patch')
-rw-r--r--meta/packages/xtscal/xtscal/cleanup.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/meta/packages/xtscal/xtscal/cleanup.patch b/meta/packages/xtscal/xtscal/cleanup.patch
new file mode 100644
index 0000000000..fc3ae8b10c
--- /dev/null
+++ b/meta/packages/xtscal/xtscal/cleanup.patch
@@ -0,0 +1,95 @@
1---
2 main.c | 45 +++++----------------------------------------
3 1 file changed, 5 insertions(+), 40 deletions(-)
4
5Index: xtscal-0.6.3/main.c
6===================================================================
7--- xtscal-0.6.3.orig/main.c 2007-06-29 16:49:14.000000000 +0100
8+++ xtscal-0.6.3/main.c 2007-06-29 16:53:11.000000000 +0100
9@@ -52,8 +52,6 @@ int flag_debug;
10 int rotation = 0;
11 int error_base, event_base;
12
13-int using_xcalibrate;
14-
15 int moving;
16
17 #define CROSSHAIR_SIZE 25
18@@ -63,7 +61,6 @@ int moving;
19 #define ENOUGH 5
20 #define MAX_SAMPLES 40
21
22-#define RAW_DEVICE "/dev/h3600_tsraw"
23 #define FONTNAME "sans-10"
24
25 struct point
26@@ -291,8 +288,6 @@ set_calibration (calibration *cal)
27 int xtrans, ytrans, xscale, yscale, xyscale, yxscale;
28 calibration ocal = *cal;
29
30- if (using_xcalibrate)
31- {
32 FILE *fp;
33 if (flag_debug)
34 printf ("constants are: %d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
35@@ -304,29 +299,6 @@ set_calibration (calibration *cal)
36 }
37 fprintf (fp, "%d %d %d %d %d %d %d\n", cal->a[1], cal->a[2], cal->a[0], cal->a[4], cal->a[5], cal->a[3], cal->a[6]);
38 fclose (fp);
39- return;
40- }
41-
42- xtrans = cal->a[0] / cal->a[6];
43- ytrans = cal->a[3] / cal->a[6];
44- xscale = cal->a[1] * 256 / cal->a[6];
45- yscale = cal->a[5] * 256 / cal->a[6];
46- xyscale = cal->a[2] * 256 / cal->a[6];
47- yxscale = cal->a[4] * 256 / cal->a[6];
48-
49- tc.xtrans = xtrans;
50- tc.ytrans = ytrans;
51- tc.xscale = xscale;
52- tc.yscale = yscale;
53- tc.xyswap = 0;
54-
55- printf ("%d %d %d %d %d\n", tc.xscale, tc.xtrans, tc.yscale, tc.ytrans, tc.xyswap);
56-
57- if (ioctl (ts_fd, TS_SET_CAL, (void *)&tc) != 0)
58- {
59- perror ("TS_SET_CAL");
60- exit (1);
61- }
62 }
63
64 void
65@@ -531,8 +503,11 @@ main (int argc, char *argv[])
66 fprintf (stderr, "failed to set raw mode: error %d\n", r);
67 exit (1);
68 }
69-
70- using_xcalibrate = 1;
71+ }
72+ else
73+ {
74+ perror ("XCALIBRATE extension missing");
75+ exit (1);
76 }
77
78 have_xrandr = xrr_supported ();
79@@ -693,16 +668,6 @@ main (int argc, char *argv[])
80
81 next_event ();
82
83- if (!using_xcalibrate)
84- {
85- ts_fd = open (RAW_DEVICE, O_RDONLY);
86- if (ts_fd < 0)
87- {
88- perror (RAW_DEVICE);
89- exit (1);
90- }
91- }
92-
93 max_fd = (xfd > ts_fd) ? xfd : ts_fd;
94
95 for (;;)