[Scummvm-git-logs] scummvm master -> 17d9e6feca958c010e9a1bd947948c22542bd525
fracturehill
noreply at scummvm.org
Mon Oct 30 09:52:52 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
481461ab9d NANCY: Fix wrong colors on BE targets
17d9e6feca NANCY: Fix resource leak when loading images
Commit: 481461ab9d63941b7b64f030fbf61c9654652ad0
https://github.com/scummvm/scummvm/commit/481461ab9d63941b7b64f030fbf61c9654652ad0
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-10-30T11:52:38+02:00
Commit Message:
NANCY: Fix wrong colors on BE targets
The resource manager rewrite (re-)introduced this bug in a
really stupid way; the endian conversion was happening
_after_ the data was already written to the surface.
Changed paths:
engines/nancy/resource.cpp
diff --git a/engines/nancy/resource.cpp b/engines/nancy/resource.cpp
index 2da7c01d6d8..dc721f4b6a2 100644
--- a/engines/nancy/resource.cpp
+++ b/engines/nancy/resource.cpp
@@ -119,7 +119,7 @@ bool ResourceManager::loadImage(const Common::String &name, Graphics::ManagedSur
uint32 bufSize = info.pitch * info.height * (info.depth / 16);
byte *buf = new byte[bufSize];
stream->read(buf, bufSize);
- GraphicsManager::copyToManaged(buf, surf, info.width, info.height, g_nancy->_graphicsManager->getInputPixelFormat());
+
#ifdef SCUMM_BIG_ENDIAN
if (info.depth == 16) {
for (uint i = 0; i < bufSize / 2; ++i) {
@@ -127,6 +127,8 @@ bool ResourceManager::loadImage(const Common::String &name, Graphics::ManagedSur
}
}
#endif
+
+ GraphicsManager::copyToManaged(buf, surf, info.width, info.height, g_nancy->_graphicsManager->getInputPixelFormat());
}
}
Commit: 17d9e6feca958c010e9a1bd947948c22542bd525
https://github.com/scummvm/scummvm/commit/17d9e6feca958c010e9a1bd947948c22542bd525
Author: Kaloyan Chehlarski (strahy at outlook.com)
Date: 2023-10-30T11:52:38+02:00
Commit Message:
NANCY: Fix resource leak when loading images
Changed paths:
engines/nancy/resource.cpp
diff --git a/engines/nancy/resource.cpp b/engines/nancy/resource.cpp
index dc721f4b6a2..7c52aec4e2d 100644
--- a/engines/nancy/resource.cpp
+++ b/engines/nancy/resource.cpp
@@ -129,6 +129,7 @@ bool ResourceManager::loadImage(const Common::String &name, Graphics::ManagedSur
#endif
GraphicsManager::copyToManaged(buf, surf, info.width, info.height, g_nancy->_graphicsManager->getInputPixelFormat());
+ delete[] buf;
}
}
More information about the Scummvm-git-logs
mailing list