summaryrefslogtreecommitdiff
path: root/dix/eventconvert.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-04-07 21:51:02 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-04-19 22:17:07 +1000
commit4318075140cc287871d3c3b9f777289ea4ffa23a (patch)
treeccc9afeb45afa4aff49d7de21ab24e5448f98856 /dix/eventconvert.c
parent9212948461c5e053abb61fff73ced4a00f138544 (diff)
dix: store subpixel precision and send it down the wire to the client.
For the valuator data, not yet for root x/y and event x/y. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'dix/eventconvert.c')
-rw-r--r--dix/eventconvert.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/dix/eventconvert.c b/dix/eventconvert.c
index 4cd5567e8..8b973a580 100644
--- a/dix/eventconvert.c
+++ b/dix/eventconvert.c
@@ -357,7 +357,7 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
xXIDeviceEvent *xde;
int i, btlen, vallen;
char *ptr;
- int32_t *axisval;
+ FP3232 *axisval;
/* FIXME: this should just send the buttons we have, not MAX_BUTTONs. Same
* with MAX_VALUATORS below */
@@ -401,15 +401,15 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi)
}
ptr += xde->buttons_len * 4;
- axisval = (int32_t*)(ptr + xde->valuators_len * 4);
+ axisval = (FP3232*)(ptr + xde->valuators_len * 4);
for (i = 0; i < sizeof(ev->valuators.mask) * 8; i++)
{
if (BitIsOn(ev->valuators.mask, i))
{
SetBit(ptr, i);
- *axisval = ev->valuators.data[i];
+ axisval->integral = ev->valuators.data[i];
+ axisval->frac = ev->valuators.data_frac[i];
axisval++;
- axisval++; /* FIXME: this should be the frac. part */
}
}
@@ -451,9 +451,10 @@ eventToRawEvent(RawDeviceEvent *ev, xEvent **xi)
{
SetBit(ptr, i);
axisval->integral = ev->valuators.data[i];
+ axisval->frac = ev->valuators.data_frac[i];
(axisval + nvals)->integral = ev->valuators.data_raw[i];
+ (axisval + nvals)->frac = ev->valuators.data_raw_frac[i];
axisval++;
- /* FIXME: frac part */
}
}