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

whoozle noreply at scummvm.org
Sun Mar 1 22:46:36 UTC 2026


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .

Summary:
3f72f49adf PHOENIXVR: reimplement pixel format detection
5937037ca5 PHOENIXVR: add default-initialisation for Cube variable
c8d5722f46 PHOENIXVR: assert that maxAxis != 0 before division


Commit: 3f72f49adf5dfe54a89af07737098878341812d6
    https://github.com/scummvm/scummvm/commit/3f72f49adf5dfe54a89af07737098878341812d6
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-01T22:42:44Z

Commit Message:
PHOENIXVR: reimplement pixel format detection

Changed paths:
    engines/phoenixvr/phoenixvr.cpp


diff --git a/engines/phoenixvr/phoenixvr.cpp b/engines/phoenixvr/phoenixvr.cpp
index e60ee55732f..adc56d49f57 100644
--- a/engines/phoenixvr/phoenixvr.cpp
+++ b/engines/phoenixvr/phoenixvr.cpp
@@ -61,13 +61,17 @@ PhoenixVREngine::PhoenixVREngine(OSystem *syst, const ADGameDescription *gameDes
 																					 _angleY(-kPi2),
 																					 _mixer(syst->getMixer()) {
 	g_engine = this;
+	bool pixelFormatFound = false;
 	for (auto format : g_system->getSupportedFormats()) {
-		debug("preferred format: %s", format.toString().c_str());
-		_pixelFormat = format;
-		break;
+		debug("supported format: %s", format.toString().c_str());
+		if (format.bytesPerPixel >= 2) {
+			pixelFormatFound = true;
+			_pixelFormat = format;
+			break;
+		}
 	}
-	if (_pixelFormat.bytesPerPixel < 2)
-		error("Expected at least 16 bit format");
+	if (!pixelFormatFound)
+		error("Couldn't find 16/32-bit pixel format");
 }
 
 PhoenixVREngine::~PhoenixVREngine() {


Commit: 5937037ca598a55e4b963fe35fbfa11b18962d53
    https://github.com/scummvm/scummvm/commit/5937037ca598a55e4b963fe35fbfa11b18962d53
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-01T22:43:19Z

Commit Message:
PHOENIXVR: add default-initialisation for Cube variable

Changed paths:
    engines/phoenixvr/vr.cpp


diff --git a/engines/phoenixvr/vr.cpp b/engines/phoenixvr/vr.cpp
index d4a466b267c..60e0d0c05b3 100644
--- a/engines/phoenixvr/vr.cpp
+++ b/engines/phoenixvr/vr.cpp
@@ -284,7 +284,7 @@ struct Cube {
 };
 
 Cube toCube(float x, float y, float z) {
-	Cube cube;
+	Cube cube = {};
 
 	float absX = fabs(x);
 	float absY = fabs(y);


Commit: c8d5722f460a198dce5912a2e2f2f8b6cccdc2ee
    https://github.com/scummvm/scummvm/commit/c8d5722f460a198dce5912a2e2f2f8b6cccdc2ee
Author: Vladimir Menshakov (vladimir.menshakov at gmail.com)
Date: 2026-03-01T22:44:42Z

Commit Message:
PHOENIXVR: assert that maxAxis != 0 before division

Changed paths:
    engines/phoenixvr/vr.cpp


diff --git a/engines/phoenixvr/vr.cpp b/engines/phoenixvr/vr.cpp
index 60e0d0c05b3..1839a988cef 100644
--- a/engines/phoenixvr/vr.cpp
+++ b/engines/phoenixvr/vr.cpp
@@ -334,6 +334,7 @@ Cube toCube(float x, float y, float z) {
 	}
 
 	// Convert range from −1 to 1 to 0 to 1
+	assert(maxAxis != 0);
 	cube.y = 0.5f * (cy / maxAxis + 1.0f);
 	cube.x = 0.5f * (cx / maxAxis + 1.0f);
 	return cube;




More information about the Scummvm-git-logs mailing list