[Scummvm-git-logs] scummvm master -> 5f7f44b10d6dfbb9b5badc32dc2077be8ff41620
sev-
noreply at scummvm.org
Sat Feb 8 17:40:51 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5f7f44b10d DIRECTOR: XTRAS: Properly offset coordinates for QTVR events
Commit: 5f7f44b10d6dfbb9b5badc32dc2077be8ff41620
https://github.com/scummvm/scummvm/commit/5f7f44b10d6dfbb9b5badc32dc2077be8ff41620
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2025-02-08T18:40:16+01:00
Commit Message:
DIRECTOR: XTRAS: Properly offset coordinates for QTVR events
Changed paths:
engines/director/lingo/xtras/qtvrxtra.cpp
diff --git a/engines/director/lingo/xtras/qtvrxtra.cpp b/engines/director/lingo/xtras/qtvrxtra.cpp
index a2d04d1adb7..becbd3f1d49 100644
--- a/engines/director/lingo/xtras/qtvrxtra.cpp
+++ b/engines/director/lingo/xtras/qtvrxtra.cpp
@@ -786,14 +786,14 @@ bool QtvrxtraWidget::processEvent(Common::Event &event) {
switch (event.type) {
case Common::EVENT_LBUTTONDOWN:
if (_xtra->_mouseDownHandler.empty()) {
- _xtra->_video->handleMouseButton(true, event.mouse.x, event.mouse.y);
+ _xtra->_video->handleMouseButton(true, event.mouse.x - _xtra->_rect.left, event.mouse.y - _xtra->_rect.top);
} else {
_xtra->_passMouseDown = false;
g_lingo->executeHandler(_xtra->_mouseDownHandler);
if (_xtra->_passMouseDown) {
- _xtra->_video->handleMouseButton(true, event.mouse.x, event.mouse.y);
+ _xtra->_video->handleMouseButton(true, event.mouse.x - _xtra->_rect.left, event.mouse.y - _xtra->_rect.top);
_xtra->_passMouseDown = false;
}
}
@@ -804,7 +804,7 @@ bool QtvrxtraWidget::processEvent(Common::Event &event) {
_xtra->_capEventsMouseDown = false;
return true;
case Common::EVENT_MOUSEMOVE:
- _xtra->_video->handleMouseMove(event.mouse.x, event.mouse.y);
+ _xtra->_video->handleMouseMove(event.mouse.x - _xtra->_rect.left, event.mouse.y - _xtra->_rect.top);
if (!_xtra->_rect.contains(event.mouse))
_xtra->_capEventsMouseOver = false;
return true;
More information about the Scummvm-git-logs
mailing list