[Scummvm-git-logs] scummvm master -> 431292d1a4c4c6f207b7b4e03aa682b457166e8e
bluegr
noreply at scummvm.org
Sun Jun 1 19:59:36 UTC 2025
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:
431292d1a4 SHERLOCK: Use initGraphicsAny for 3DO screen resolutions
Commit: 431292d1a4c4c6f207b7b4e03aa682b457166e8e
https://github.com/scummvm/scummvm/commit/431292d1a4c4c6f207b7b4e03aa682b457166e8e
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2025-06-01T22:59:32+03:00
Commit Message:
SHERLOCK: Use initGraphicsAny for 3DO screen resolutions
Changed paths:
engines/sherlock/scalpel/scalpel.cpp
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 0a84c0cb7b4..de22003ef89 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -253,20 +253,19 @@ void ScalpelEngine::setupGraphics() {
initGraphics(320, 200);
} else {
// 3DO actually uses RGB555, but some platforms of ours only support RGB565, so we use that
+ // TODO: Support platforms without RGB565
const Graphics::PixelFormat pixelFormatRGB565 = Graphics::PixelFormat(2, 5, 6, 5, 0, 11, 5, 0, 0);
- // First try for a 640x400 mode
- g_system->beginGFXTransaction();
- initCommonGFX(false);
- g_system->initSize(640, 400, &pixelFormatRGB565);
- OSystem::TransactionError gfxError = g_system->endGFXTransaction();
-
- if (gfxError == OSystem::kTransactionSuccess) {
- _isScreenDoubled = true;
- } else {
+ Graphics::ModeWithFormatList modes = {
+ // First try for a 640x400 mode
+ Graphics::ModeWithFormat(640, 400, pixelFormatRGB565),
// System doesn't support it, so fall back on 320x200 mode
- initGraphics(320, 200, &pixelFormatRGB565);
- }
+ Graphics::ModeWithFormat(320, 200, pixelFormatRGB565),
+ };
+
+ int modeIdx = initGraphicsAny(modes);
+
+ _isScreenDoubled = (modeIdx == 0);
}
}
More information about the Scummvm-git-logs
mailing list