[Scummvm-git-logs] scummvm master -> 0afa5fa32736988303087e5e069e254eb66145bc
whoozle
noreply at scummvm.org
Thu Feb 12 22:16:11 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
0afa5fa327 PHOENIXVR: track focus and ignore mouse events if focus was lost
Commit: 0afa5fa32736988303087e5e069e254eb66145bc
https://github.com/scummvm/scummvm/commit/0afa5fa32736988303087e5e069e254eb66145bc
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-02-12T22:15:27Z
Commit Message:
PHOENIXVR: track focus and ignore mouse events if focus was lost
Changed paths:
engines/phoenixvr/phoenixvr.cpp
engines/phoenixvr/phoenixvr.h
diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 50c14053cfd..298bf94c55a 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -825,10 +825,14 @@ Common::Error PhoenixVREngine::run() {
goToWarp(rclick, true);
} break;
case Common::EVENT_MOUSEMOVE:
+ if (!_hasFocus)
+ break;
_mousePos = event.mouse;
_mouseRel += event.relMouse;
break;
case Common::EVENT_LBUTTONUP: {
+ if (!_hasFocus)
+ break;
auto vrPos = currentVRPos();
if (_vr.isVR()) {
debug("click ax: %g, ay: %g", vrPos.x, vrPos.y);
@@ -854,6 +858,12 @@ Common::Error PhoenixVREngine::run() {
}
}
} break;
+ case Common::EVENT_FOCUS_GAINED:
+ _hasFocus = true;
+ break;
+ case Common::EVENT_FOCUS_LOST:
+ _hasFocus = false;
+ break;
default:
break;
}
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 90a3e6ba7c2..5b07cc66812 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -194,6 +194,7 @@ private:
void renderVR(float dt);
private:
+ bool _hasFocus = true;
Common::Point _mousePos, _mouseRel;
Common::String _nextScript;
Common::Path _currentScriptPath;
More information about the Scummvm-git-logs
mailing list