comparison ds.c @ 6:eafcd170dc6d

Add circle pad and c pad support, and provisional touch support.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 18 Aug 2015 02:07:48 +0100
parents 73c20831be0a
children 6aa40a25de22
comparison
equal deleted inserted replaced
5:c0223d75444d 6:eafcd170dc6d
42 maybe_do_uinput(left, BTN_DPAD_LEFT); 42 maybe_do_uinput(left, BTN_DPAD_LEFT);
43 maybe_do_uinput(right, BTN_DPAD_RIGHT); 43 maybe_do_uinput(right, BTN_DPAD_RIGHT);
44 44
45 /* DIRECTIONS */ 45 /* DIRECTIONS */
46 46
47 /* 47 if(previous.pad.x != ds->pad.x)
48 if(previous.aX != ds->aX) 48 do_uinput(uinput_fd, ABS_X, ds->pad.x, EV_ABS);
49 do_uinput(uinput_fd, ABS_X, ds->aX, EV_ABS);
50 49
51 if(previous.aY != ds->aY) 50 if(previous.pad.y != ds->pad.y)
52 do_uinput(uinput_fd, ABS_Y, ds->aY, EV_ABS); 51 do_uinput(uinput_fd, ABS_Y, ds->pad.y, EV_ABS);
53 */
54 52
55 previous.hex = ds->hex; 53 if(previous.cpad.x != ds->cpad.x)
54 do_uinput(uinput_fd, ABS_RX, ds->cpad.x, EV_ABS);
55
56 if(previous.cpad.y != ds->cpad.y)
57 do_uinput(uinput_fd, ABS_RY, ds->cpad.y, EV_ABS);
58
59 flush_uinput(uinput_fd);
60
61 memcpy(&previous, ds, sizeof(ds_t));
56 62
57 return; 63 return;
58 } 64 }