[Scummvm-git-logs] scummvm master -> a1111d03d03c049db3a961ac99cae89709e64800

whoozle noreply at scummvm.org
Wed Jul 15 23:17:09 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:
a1111d03d0 PHOENIXVR: process focus events in all event loops


Commit: a1111d03d03c049db3a961ac99cae89709e64800
    https://github.com/scummvm/scummvm/commit/a1111d03d03c049db3a961ac99cae89709e64800
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-07-16T00:15:11+01:00

Commit Message:
PHOENIXVR: process focus events in all event loops

Changed paths:
    engines/phoenixvr/phoenixvr.cpp
    engines/phoenixvr/phoenixvr.h


diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index 1abc043bd0d..e83066d8f40 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -509,6 +509,7 @@ void PhoenixVREngine::interpolateAngle(float x, float y, float speed, float zoom
 				break;
 			}
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -565,6 +566,7 @@ void PhoenixVREngine::fade(int start, int stop, int speed) {
 			}
 
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -618,8 +620,15 @@ void PhoenixVREngine::transFade(int speed) {
 		while (!shouldQuit() && waiting && (direction > 0 ? pos < 0 : pos > -256)) {
 			Common::Event event;
 			while (g_system->getEventManager()->pollEvent(event)) {
-				if (event.type == Common::EVENT_KEYDOWN && event.kbd.ascii == ' ')
-					waiting = false;
+				switch (event.type) {
+				case Common::EVENT_KEYDOWN:
+					if (event.kbd.ascii == ' ')
+						waiting = false;
+					break;
+				default:
+					processGenericEvents(event);
+					break;
+				}
 			}
 
 			renderTransition(direction > 0 ? 0 : pos, direction > 0 ? pos : 0);
@@ -646,6 +655,7 @@ void PhoenixVREngine::until(const Common::String &var, int value) {
 		while (g_system->getEventManager()->pollEvent(event)) {
 			switch (event.type) {
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -671,6 +681,7 @@ void PhoenixVREngine::wait(float seconds) {
 		while (g_system->getEventManager()->pollEvent(event)) {
 			switch (event.type) {
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -944,6 +955,7 @@ void PhoenixVREngine::playMovie(const Common::String &movie) {
 			}
 
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -1600,7 +1612,7 @@ Common::Error PhoenixVREngine::run() {
 				}
 			} break;
 			case Common::EVENT_RBUTTONUP: {
-				if (_prevWarp != -1)
+				if (!_hasFocus || _prevWarp != -1)
 					break;
 				debug("right click");
 				auto &rclick = _lockKey[12];
@@ -1645,13 +1657,8 @@ Common::Error PhoenixVREngine::run() {
 					}
 				}
 			} break;
-			case Common::EVENT_FOCUS_GAINED:
-				_hasFocus = true;
-				break;
-			case Common::EVENT_FOCUS_LOST:
-				_hasFocus = false;
-				break;
 			default:
+				processGenericEvents(event);
 				break;
 			}
 		}
@@ -1671,6 +1678,20 @@ Common::Error PhoenixVREngine::run() {
 	return Common::kNoError;
 }
 
+void PhoenixVREngine::processGenericEvents(const Common::Event &event) {
+	switch (event.type) {
+	case Common::EVENT_FOCUS_GAINED:
+		_hasFocus = true;
+		_mouseRel = {};
+		break;
+	case Common::EVENT_FOCUS_LOST:
+		_hasFocus = false;
+		break;
+	default:
+		break;
+	}
+}
+
 bool PhoenixVREngine::testSaveSlot(int idx) const {
 	return _saveFileMan->exists(getSaveStateName(idx));
 }
diff --git a/engines/phoenixvr/phoenixvr.h b/engines/phoenixvr/phoenixvr.h
index 5c8c8dd293f..cd073c9f0ca 100644
--- a/engines/phoenixvr/phoenixvr.h
+++ b/engines/phoenixvr/phoenixvr.h
@@ -45,6 +45,10 @@
 #include "phoenixvr/script.h"
 #include "phoenixvr/vr.h"
 
+namespace Common {
+class Event;
+}
+
 namespace Graphics {
 class Font;
 }
@@ -236,6 +240,8 @@ private:
 	void setupSubtitles(Video::Subtitles &subtitles) const;
 	void drawAudioSubtitles();
 
+	void processGenericEvents(const Common::Event &event);
+
 private:
 	bool _hasFocus = true;
 	Common::Point _mousePos, _mouseRel;




More information about the Scummvm-git-logs mailing list