diff --git a/hid-xpadneo/src/hid-xpadneo.c b/hid-xpadneo/src/hid-xpadneo.c index dd17fab4..0e59ea73 100644 --- a/hid-xpadneo/src/hid-xpadneo.c +++ b/hid-xpadneo/src/hid-xpadneo.c @@ -847,7 +847,8 @@ static int xpadneo_raw_event(struct hid_device *hdev, struct hid_report *report, } } - //TODO Maybe intercept mouse mode here + if (xpadneo_mouse_raw_event(xdata, report, data, reportsize)) + return -1; return 0; } diff --git a/hid-xpadneo/src/xpadneo.h b/hid-xpadneo/src/xpadneo.h index def039f1..e8d60f70 100644 --- a/hid-xpadneo/src/xpadneo.h +++ b/hid-xpadneo/src/xpadneo.h @@ -190,6 +190,7 @@ extern int xpadneo_init_consumer(struct xpadneo_devdata *); extern int xpadneo_init_mouse(struct xpadneo_devdata *); extern int xpadneo_init_synthetic(struct xpadneo_devdata *, char *, struct input_dev **); extern int xpadneo_mouse_event(struct xpadneo_devdata *, struct hid_usage *, __s32); +extern int xpadneo_mouse_raw_event(struct xpadneo_devdata *, struct hid_report *, u8 *, int) extern void xpadneo_mouse_report(struct timer_list *); extern void xpadneo_toggle_mouse(struct xpadneo_devdata *); diff --git a/hid-xpadneo/src/xpadneo/mouse.c b/hid-xpadneo/src/xpadneo/mouse.c index eeef6896..b1319831 100644 --- a/hid-xpadneo/src/xpadneo/mouse.c +++ b/hid-xpadneo/src/xpadneo/mouse.c @@ -42,6 +42,15 @@ extern void xpadneo_mouse_report(struct timer_list *t) } #define rescale_axis(v,d) (((v)<(d)&&(v)>-(d))?0:(32768*((v)>0?(v)-(d):(v)+(d))/(32768-(d)))) +extern int xpadneo_mouse_raw_event(struct xpadneo_devdata *xdata, struct hid_report *report, + u8 *data, int reportsize) +{ + if (!xdata->mouse_mode) + return 0; +//todo! +} + + extern int xpadneo_mouse_event(struct xpadneo_devdata *xdata, struct hid_usage *usage, __s32 value) { if (!xdata->mouse_mode)