Mouse coordinates for UI mouse events are actually data1/data2, not x/y

This commit is contained in:
ZZYZX 2017-02-03 20:49:45 +02:00
parent f816537992
commit b18b71c065

View file

@ -941,8 +941,9 @@ bool DStaticEventHandler::UiProcess(event_t* ev)
break; break;
default: // mouse event default: // mouse event
// note: SDL input doesn't seem to provide these at all // note: SDL input doesn't seem to provide these at all
e->MouseX = ev->x; //Printf("Mouse data: %d, %d, %d, %d\n", ev->x, ev->y, ev->data1, ev->data2);
e->MouseY = ev->y; e->MouseX = ev->data1;
e->MouseY = ev->data2;
e->IsShift = !!(ev->data3 & GKM_SHIFT); e->IsShift = !!(ev->data3 & GKM_SHIFT);
e->IsAlt = !!(ev->data3 & GKM_ALT); e->IsAlt = !!(ev->data3 & GKM_ALT);
e->IsCtrl = !!(ev->data3 & GKM_CTRL); e->IsCtrl = !!(ev->data3 & GKM_CTRL);