[Scummvm-git-logs] scummvm master -> 502d171fc3c1d4b2cc29996593e6459edba04f54
sev-
noreply at scummvm.org
Sun Jun 5 23:56:54 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
502d171fc3 GRAPHICS: Improved error message on surface conversion
Commit: 502d171fc3c1d4b2cc29996593e6459edba04f54
https://github.com/scummvm/scummvm/commit/502d171fc3c1d4b2cc29996593e6459edba04f54
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2022-06-06T01:55:58+02:00
Commit Message:
GRAPHICS: Improved error message on surface conversion
Changed paths:
graphics/surface.cpp
diff --git a/graphics/surface.cpp b/graphics/surface.cpp
index 66bc3f17f86..6f6772971e6 100644
--- a/graphics/surface.cpp
+++ b/graphics/surface.cpp
@@ -457,10 +457,10 @@ void Surface::convertToInPlace(const PixelFormat &dstFormat, const byte *palette
}
if (format.bytesPerPixel == 0 || format.bytesPerPixel > 4)
- error("Surface::convertToInPlace(): Can only convert from 1Bpp, 2Bpp, 3Bpp, and 4Bpp");
+ error("Surface::convertToInPlace(): Can only convert from 1Bpp, 2Bpp, 3Bpp, and 4Bpp but have %dbpp", format.bytesPerPixel);
if (dstFormat.bytesPerPixel != 2 && dstFormat.bytesPerPixel != 4)
- error("Surface::convertToInPlace(): Can only convert to 2Bpp and 4Bpp");
+ error("Surface::convertToInPlace(): Can only convert to 2Bpp and 4Bpp but requested %dbpp", dstFormat.bytesPerPixel);
// In case the surface data needs more space allocate it.
if (dstFormat.bytesPerPixel > format.bytesPerPixel) {
@@ -528,10 +528,10 @@ Graphics::Surface *Surface::convertTo(const PixelFormat &dstFormat, const byte *
}
if (format.bytesPerPixel == 0 || format.bytesPerPixel > 4)
- error("Surface::convertTo(): Can only convert from 1Bpp, 2Bpp, 3Bpp, and 4Bpp");
+ error("Surface::convertTo(): Can only convert from 1Bpp, 2Bpp, 3Bpp, and 4Bpp but have %dbpp", format.bytesPerPixel);
if (dstFormat.bytesPerPixel < 2 || dstFormat.bytesPerPixel > 4)
- error("Surface::convertTo(): Can only convert to 2Bpp, 3Bpp and 4Bpp");
+ error("Surface::convertTo(): Can only convert to 2Bpp, 3Bpp and 4Bpp but requested %dbpp", dstFormat.bytesPerPixel);
surface->create(w, h, dstFormat);
More information about the Scummvm-git-logs
mailing list