aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/adl/adl.cpp3
-rw-r--r--engines/adl/display_a2.cpp6
2 files changed, 6 insertions, 3 deletions
diff --git a/engines/adl/adl.cpp b/engines/adl/adl.cpp
index baf14ea466..9bd0011c5f 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 773bfb21f8..4e25fbd495 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