Half sensitivity for XInput2 raw motion so it's about same as cursor sensitivity from before

This commit is contained in:
UnknownShadow200 2020-04-23 18:39:21 +10:00
parent ca231d854c
commit b3b2ed22f6

View File

@ -1821,8 +1821,9 @@ static void HandleGenericEvent(XEvent* e) {
if (e->xcookie.evtype == XI_RawMotion && Input_RawMode) { if (e->xcookie.evtype == XI_RawMotion && Input_RawMode) {
ev = (XIRawEvent*)e->xcookie.data; ev = (XIRawEvent*)e->xcookie.data;
/* Using 0.5f here makes the sensitivity about same as normal cursor movement */
Event_RaiseMove(&PointerEvents.RawMoved, 0, Event_RaiseMove(&PointerEvents.RawMoved, 0,
ev->raw_values[0], ev->raw_values[1]); ev->raw_values[0] * 0.5f, ev->raw_values[1] * 0.5f);
} }
XFreeEventData(win_display, &e->xcookie); XFreeEventData(win_display, &e->xcookie);
} }
@ -1848,7 +1849,6 @@ static void InitRawMouse(void) {
return; return;
} }
// todo multiply detla by 2
XISetMask(masks, XI_RawMotion); XISetMask(masks, XI_RawMotion);
evmask.deviceid = XIAllMasterDevices; evmask.deviceid = XIAllMasterDevices;
evmask.mask_len = sizeof(masks); evmask.mask_len = sizeof(masks);