mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +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;
|
||||
default: // mouse event
|
||||
// note: SDL input doesn't seem to provide these at all
|
||||
e->MouseX = ev->x;
|
||||
e->MouseY = ev->y;
|
||||
//Printf("Mouse data: %d, %d, %d, %d\n", ev->x, ev->y, ev->data1, ev->data2);
|
||||
e->MouseX = ev->data1;
|
||||
e->MouseY = ev->data2;
|
||||
e->IsShift = !!(ev->data3 & GKM_SHIFT);
|
||||
e->IsAlt = !!(ev->data3 & GKM_ALT);
|
||||
e->IsCtrl = !!(ev->data3 & GKM_CTRL);
|
||||
|
|
Loading…
Reference in a new issue