Mercurial > remote-gamepad-server
comparison 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 |
comparison
equal
deleted
inserted
replaced
5:c0223d75444d | 6:eafcd170dc6d |
---|---|
112 // Device and Socket are ok :-D | 112 // Device and Socket are ok :-D |
113 fprintf(stdout, " [%d] Creation of service: OK\n", curdev); | 113 fprintf(stdout, " [%d] Creation of service: OK\n", curdev); |
114 | 114 |
115 | 115 |
116 /* Center device axis when created */ | 116 /* Center device axis when created */ |
117 do_uinput(uinput_fd, ABS_Y, DS_MAX_Y/2, EV_ABS); | 117 do_uinput(uinput_fd, ABS_X, 0, EV_ABS); |
118 do_uinput(uinput_fd, ABS_X, DS_MAX_X/2, EV_ABS); | 118 do_uinput(uinput_fd, ABS_Y, 0, EV_ABS); |
119 do_uinput(uinput_fd, ABS_RX, 0, EV_ABS); | |
120 do_uinput(uinput_fd, ABS_RY, 0, EV_ABS); | |
121 //do_uinput(uinput_fd, ABS_TOUCH_X, (TOUCH_MAX_X - TOUCH_MIN_X) / 2, EV_ABS); | |
122 //do_uinput(uinput_fd, ABS_TOUCH_Y, (TOUCH_MAX_Y - TOUCH_MIN_Y) / 2, EV_ABS); | |
119 | 123 |
120 while(1){ | 124 while(1){ |
121 result = receive_ds_info(sock_fd, &ds); | 125 result = receive_ds_info(sock_fd, &ds); |
122 if(result == -1){ | 126 if(result == -1){ |
123 fprintf(stderr, " [%d] DS Info receive failed\n", curdev); | 127 fprintf(stderr, " [%d] DS Info receive failed\n", curdev); |