mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-29 15:32:57 +00:00
Mouse coordinates for UI mouse events are actually data1/data2, not x/y
This commit is contained in:
parent
f816537992
commit
b18b71c065
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue