diff options
Diffstat (limited to 'graphics/VectorRendererSpec.cpp')
-rw-r--r-- | graphics/VectorRendererSpec.cpp | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/graphics/VectorRendererSpec.cpp b/graphics/VectorRendererSpec.cpp index 46c0ec6a67..055a51a4a1 100644 --- a/graphics/VectorRendererSpec.cpp +++ b/graphics/VectorRendererSpec.cpp @@ -151,8 +151,6 @@ inline uint32 fp_sqroot(uint32 x) { } -extern int gBitFormat; - namespace Graphics { VectorRenderer *createRenderer(int mode) { @@ -172,21 +170,27 @@ VectorRenderer *createRenderer(int mode) { return 0; \ } + // FIXME/TODO: This looks like a real gross hack. // It might be fine to assume that '1555' only happens for PSP // so it could maybe be handled via DISABLE_FANCY_THEMES, // same goes for 4444, which is only used by DC port. - if (gBitFormat == 1555) { + PixelFormat format = g_system->getOverlayFormat(); + if (format == createPixelFormat<1555>()) { CREATE_RENDERER_16(1555) - } else if (gBitFormat == 4444) { + } + if (format == createPixelFormat<4444>()) { CREATE_RENDERER_16(4444) - } else if (gBitFormat == 555) { + } + if (format == createPixelFormat<555>()) { CREATE_RENDERER_16(555) - } else if (gBitFormat == 565) { + } + if (format == createPixelFormat<565>()) { CREATE_RENDERER_16(565) - } else { - return 0; } + + return 0; + #undef CREATE_RENDERER_16 #endif } |