Hi,

the patch works on my freerunner when the display is not rotated. When
I use

Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "tslib"
        Option          "CorePointer"
        Option          "TslibDevice"           "/dev/input/event1"
        Option          "Rotate"        "CW"
        Option          "Width"                 "480"
        Option          "Height"                "640"
EndSection

Section "Device"
        Identifier      "Configured Video Device"
        Driver          "fbdev"
        Option          "Rotate"        "CW"
EndSection


to rotate the display the scaling is wrong (pointer moves too fast in
x direction and too slow in y direction) and I can't reach the bottom
right corner at all.

I looked at the patch and noticed that it uses InitValuatorAxisStruct
with the same width and height regardless of the rotation. I can get
rotated mode work with the following updated patch:

--- a/src/tslib.c.orig  2008-08-16 19:35:47.000000000 +0300
+++ b/src/tslib.c       2008-08-16 19:23:15.000000000 +0300
@@ -185,10 +185,12 @@
 {
        InputInfoPtr pInfo;
        unsigned char map[MAXBUTTONS + 1];
-       int i;
+       int i, axiswidth, axisheight;
+       struct ts_priv *priv;
 
        ErrorF("%s\n", __FUNCTION__);
        pInfo = device->public.devicePrivate;
+       priv = pInfo->private;
 
        switch (what) {
        case DEVICE_INIT:
@@ -224,15 +226,29 @@
                        return !Success;
                }
 
-               InitValuatorAxisStruct(device, 0, 0, /* min val */ 1023,        
/* max val */
-                                              1024,    /* resolution */
-                                              0,       /* min_res */
-                                              1024);   /* max_res */
-
-               InitValuatorAxisStruct(device, 1, 0, /* min val */ 1023,        
/* max val */
-                                              1024,    /* resolution */
-                                              0,       /* min_res */
-                                              1024);   /* max_res */
+               switch(priv->rotate) {
+               case TSLIB_ROTATE_CW:
+               case TSLIB_ROTATE_CCW:
+                       axiswidth = priv->height;
+                       axisheight = priv->width;
+                       break;
+               default:
+                       axiswidth = priv->width;
+                       axisheight = priv->height;
+                       break;
+               }
+
+               InitValuatorAxisStruct(device, 0, 0,            /* min val */
+                                              axiswidth - 1,   /* max val */
+                                              axiswidth,       /* resolution */
+                                              0,               /* min_res */
+                                              axiswidth);      /* max_res */
+
+               InitValuatorAxisStruct(device, 1, 0,            /* min val */
+                                              axisheight - 1,  /* max val */
+                                              axisheight,      /* resolution */
+                                              0,               /* min_res */
+                                              axisheight);     /* max_res */
 
                if (InitProximityClassDeviceStruct (device) == FALSE) {
                        ErrorF ("Unable to allocate EVTouch touchscreen 
ProximityClassDeviceStruct\n");


Is this still too late for lenny?


best regards,
Timo Lindfors



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to