From 508f254ff7f962b01055bcd5cde23f43668016f2 Mon Sep 17 00:00:00 2001 From: Joost Peters Date: Mon, 26 Jan 2009 16:39:05 +0000 Subject: error out when no renderer was created due to unknown/unsupported PixelFormat svn-id: r36074 --- graphics/VectorRendererSpec.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'graphics') diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 055a51a4a1..7ae9bb69ff 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -178,15 +178,14 @@ VectorRenderer *createRenderer(int mode) { PixelFormat format = g_system->getOverlayFormat(); if (format == createPixelFormat<1555>()) { CREATE_RENDERER_16(1555) - } - if (format == createPixelFormat<4444>()) { + } else if (format == createPixelFormat<4444>()) { CREATE_RENDERER_16(4444) - } - if (format == createPixelFormat<555>()) { + } else if (format == createPixelFormat<555>()) { CREATE_RENDERER_16(555) - } - if (format == createPixelFormat<565>()) { + } else if (format == createPixelFormat<565>()) { CREATE_RENDERER_16(565) + } else { + error("createRenderer(): PixelFormat not supported"); } return 0; -- cgit v1.2.3