[Scummvm-git-logs] scummvm master -> a6aea5c20113fab23f58d3bdd2047fab7e3e2169
ccawley2011
ccawley2011 at gmail.com
Thu Sep 19 20:47:04 CEST 2019
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:
a6aea5c201 ADL: Support using any pixel format for the display
Commit: a6aea5c20113fab23f58d3bdd2047fab7e3e2169
https://github.com/scummvm/scummvm/commit/a6aea5c20113fab23f58d3bdd2047fab7e3e2169
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2019-09-19T19:46:59+01:00
Commit Message:
ADL: Support using any pixel format for the display
Changed paths:
engines/adl/adl.cpp
engines/adl/display_a2.cpp
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index baf14ea..9bd0011 100644
--- a/engines/adl/adl.cpp
+++ b/engines/adl/adl.cpp
@@ -731,6 +731,9 @@ void AdlEngine::gameLoop() {
Common::Error AdlEngine::run() {
_display = Display_A2_create();
+ if (!_display)
+ return Common::kUnsupportedColorMode;
+
_console = new Console(this);
_display->init();
diff --git a/engines/adl/display_a2.cpp b/engines/adl/display_a2.cpp
index 773bfb2..4e25fbd 100644
--- a/engines/adl/display_a2.cpp
+++ b/engines/adl/display_a2.cpp
@@ -651,8 +651,8 @@ static Display_A2 *Display_A2_create_helper() {
}
Display_A2 *Display_A2_create() {
- initGraphics(Display_A2::kGfxWidth * 2, Display_A2::kGfxHeight * 2, new Graphics::PixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0));
- debugN(1, "Initialized graphics with format: %s\n", g_system->getScreenFormat().toString().c_str());
+ initGraphics(Display_A2::kGfxWidth * 2, Display_A2::kGfxHeight * 2, nullptr);
+ debugN(1, "Initialized graphics with format: %s", g_system->getScreenFormat().toString().c_str());
const uint bpp = g_system->getScreenFormat().bytesPerPixel;
@@ -661,7 +661,7 @@ Display_A2 *Display_A2_create() {
else if (bpp == 2)
return Display_A2_create_helper<uint16>();
else
- error("Graphics format uses %d bytes per pixel", bpp);
+ return nullptr;
}
} // End of namespace Adl
More information about the Scummvm-git-logs
mailing list