aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorJoost Peters2009-01-26 16:39:05 +0000
committerJoost Peters2009-01-26 16:39:05 +0000
commit508f254ff7f962b01055bcd5cde23f43668016f2 (patch)
treef5d99013e184e29e757813742fd4d56adba7e2a9 /graphics
parentc2847572f1e6faca8983833a72d44e0cb962c13b (diff)
downloadscummvm-rg350-508f254ff7f962b01055bcd5cde23f43668016f2.tar.gz
scummvm-rg350-508f254ff7f962b01055bcd5cde23f43668016f2.tar.bz2
scummvm-rg350-508f254ff7f962b01055bcd5cde23f43668016f2.zip
error out when no renderer was created due to unknown/unsupported PixelFormat
svn-id: r36074
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRendererSpec.cpp11
1 files changed, 5 insertions, 6 deletions
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;