EVENTS: Added relative mouse position in virtual mouse

This commit is contained in:
Pawel Kolodziejski 2020-10-06 15:39:07 +02:00
parent d63f0e7513
commit eb83a03208

View File

@ -99,6 +99,9 @@ bool VirtualMouse::pollEvent(Event &event) {
event.mouse.x = CLIP<int16>(event.mouse.x, 0, screenSize.width());
event.mouse.y = CLIP<int16>(event.mouse.y, 0, screenSize.height());
event.relMouse.x = delta.x; // ResidualVM
event.relMouse.y = delta.y; // ResidualVM
g_system->warpMouse(event.mouse.x, event.mouse.y);
return true;