diff service.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 f362b20de51e
children
line wrap: on
line diff
--- a/service.c
+++ b/service.c
@@ -114,8 +114,12 @@ void start_service(void){
 
 
     /* Center device axis when created */
-    do_uinput(uinput_fd, ABS_Y, DS_MAX_Y/2, EV_ABS);
-    do_uinput(uinput_fd, ABS_X, DS_MAX_X/2, EV_ABS);
+    do_uinput(uinput_fd, ABS_X, 0, EV_ABS);
+    do_uinput(uinput_fd, ABS_Y, 0, EV_ABS);
+    do_uinput(uinput_fd, ABS_RX, 0, EV_ABS);
+    do_uinput(uinput_fd, ABS_RY, 0, EV_ABS);
+    //do_uinput(uinput_fd, ABS_TOUCH_X, (TOUCH_MAX_X - TOUCH_MIN_X) / 2, EV_ABS);
+    //do_uinput(uinput_fd, ABS_TOUCH_Y, (TOUCH_MAX_Y - TOUCH_MIN_Y) / 2, EV_ABS);
 
     while(1){
         result = receive_ds_info(sock_fd, &ds);