From 3be56f6dbcfed89af90e4f3c00d5b8aaa795c472 Mon Sep 17 00:00:00 2001 From: wowzaman12 Date: Sun, 5 Apr 2015 22:25:07 +0000 Subject: [PATCH] re-added color depth checks. --- src/wx/panel.cpp | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index fda0f626..af864bee 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -1025,21 +1025,38 @@ DrawingPanel::DrawingPanel(int _width, int _height) : } while(0); } else { scale = builtin_ff_scale(gopts.filter); +#ifndef NO_ASM + // while there is a 32->16 frontend for these, it's probably more + // efficient to just use 16 to start with + // unfortunately, this also means that the 32-bit output needs to + // be sensed in lower code + if(gopts.filter == FF_HQ3X || gopts.filter == FF_HQ4X) + systemColorDepth = 16; + else +#endif #define out_16 (systemColorDepth == 16) systemColorDepth = 32; } // Intialize color tables + if(systemColorDepth == 32) { #if wxBYTE_ORDER == wxLITTLE_ENDIAN - systemRedShift = 3; - systemGreenShift = 11; - systemBlueShift = 19; - RGB_LOW_BITS_MASK = 0x00010101; + systemRedShift = 3; + systemGreenShift = 11; + systemBlueShift = 19; + RGB_LOW_BITS_MASK = 0x00010101; #else - systemRedShift = 27; - systemGreenShift = 19; - systemBlueShift = 11; - RGB_LOW_BITS_MASK = 0x01010100; + systemRedShift = 27; + systemGreenShift = 19; + systemBlueShift = 11; + RGB_LOW_BITS_MASK = 0x01010100; #endif + } else { + // plugins expect RGB in native byte order + systemRedShift = 10; + systemGreenShift = 5; + systemBlueShift = 0; + RGB_LOW_BITS_MASK = 0x0421; + } // FIXME: should be "true" for GBA carts if lcd mode selected // which means this needs to be re-run at pref change time utilUpdateSystemColorMaps(false);