[Scummvm-git-logs] scummvm master -> a1584dd0efffd02d75de7d0d348e9006627a53b0
athrxx
noreply at scummvm.org
Sun Nov 15 22:44:35 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:
a1584dd0ef SNATCHER: fix aspect ratio correction
Commit: a1584dd0efffd02d75de7d0d348e9006627a53b0
https://github.com/scummvm/scummvm/commit/a1584dd0efffd02d75de7d0d348e9006627a53b0
Author: athrxx (athrxx at scummvm.org)
Date: 2026-11-15T23:43:39+01:00
Commit Message:
SNATCHER: fix aspect ratio correction
- The aspect ratio was wrong.
- Also change scaling to produce exactly 640x400 pixels.
Changed paths:
engines/snatcher/animator_scd.cpp
graphics/segagfx.cpp
diff --git a/engines/snatcher/animator_scd.cpp b/engines/snatcher/animator_scd.cpp
index 74157a75652..c2e0337e6aa 100644
--- a/engines/snatcher/animator_scd.cpp
+++ b/engines/snatcher/animator_scd.cpp
@@ -291,7 +291,7 @@ Animator_SCD::Animator_SCD(const Graphics::PixelFormat *pxf, GraphicsEngine::Gfx
_sr->setResolution(_screenWidth, _screenHeight);
if (enableAspectRatioCorrection)
- _sr->setAspectRatioCorrection(4.0 / 3.0, 2.0);
+ _sr->setAspectRatioCorrection(4.0 / 3.0, 2.145);
_sr->getRealResolution(_realScreenWidth, _realScreenHeight);
_sr->setupWindowPlane(0, 0, Graphics::SegaRenderer::kWinToLeft, Graphics::SegaRenderer::kWinToTop);
_sr->hINT_setHandler(&_hINTClientProc);
diff --git a/graphics/segagfx.cpp b/graphics/segagfx.cpp
index aba6ef03532..076fbce00c9 100644
--- a/graphics/segagfx.cpp
+++ b/graphics/segagfx.cpp
@@ -129,15 +129,15 @@ void SegaRenderer::setAspectRatioCorrection(double xyAspectRatio, double scaleFa
_xyAspectRatio = xyAspectRatio;
_scaleFactor = scaleFactor;
- _arcCntX = _arcIncY = 0;
+ _arcCntX = _arcCntY = 0;
_arcIncX = _arcIncY = trunc(scaleFactor * 0x10000);
double screenRatio = (double)_screenW / _screenH;
if (screenRatio > xyAspectRatio)
- _arcIncY = trunc((scaleFactor * 0x10000) / xyAspectRatio);
+ _arcIncY = trunc((scaleFactor * screenRatio * 0x10000) / xyAspectRatio);
else if (screenRatio < xyAspectRatio)
- _arcIncX = trunc(xyAspectRatio * scaleFactor * 0x10000);
+ _arcIncX = trunc(xyAspectRatio * scaleFactor * 0x10000 / screenRatio);
_realW = (_screenW * _arcIncX) >> 16;
_realH = (_screenH * _arcIncY) >> 16;
More information about the Scummvm-git-logs
mailing list