~ubuntu-branches/ubuntu/raring/xserver-xorg-input-synaptics/raring-proposed

« back to all changes in this revision

Viewing changes to src/alpscomm.c

  • Committer: Package Import Robot
  • Author(s): Chase Douglas
  • Date: 2012-01-19 17:44:47 UTC
  • mfrom: (2.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20120119174447-3im0n1v2g2c4pyij
Tags: 1.5.0+git20120101-1ubuntu2
* Add some error handling so eventcomm-test doesn't segfault
  - Modified 127_multitouch.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#endif
34
34
 
35
35
#include <xorg-server.h>
36
 
#include "alpscomm.h"
37
36
#include "synproto.h"
38
37
#include "synaptics.h"
39
38
#include "synapticsstr.h"
 
39
#include "ps2comm.h"
40
40
#include <xf86.h>
41
41
 
42
42
 
155
155
    int left = 0, right = 0, middle = 0;
156
156
    int i;
157
157
 
 
158
    hw->millis = GetTimeInMillis();
 
159
 
158
160
    x = (packet[1] & 0x7f) | ((packet[2] & 0x78) << (7-3));
159
161
    y = (packet[4] & 0x7f) | ((packet[3] & 0x70) << (7-4));
160
162
    z = packet[5];
206
208
 
207
209
static Bool
208
210
ALPSReadHwState(InputInfoPtr pInfo,
209
 
                struct SynapticsProtocolOperations *proto_ops,
210
211
                struct CommData *comm, struct SynapticsHwState *hwRet)
211
212
{
212
213
    unsigned char *buf = comm->protoBuf;
221
222
    return TRUE;
222
223
}
223
224
 
224
 
static Bool
225
 
ALPSAutoDevProbe(InputInfoPtr pInfo)
226
 
{
227
 
    return FALSE;
228
 
}
229
 
 
230
225
struct SynapticsProtocolOperations alps_proto_operations = {
231
226
    NULL,
232
227
    NULL,
233
228
    ALPSQueryHardware,
234
229
    ALPSReadHwState,
235
 
    ALPSAutoDevProbe,
236
 
    SynapticsDefaultDimensions
 
230
    NULL,
 
231
    NULL
237
232
};