diff --git a/src/core/gpu_hw.cpp b/src/core/gpu_hw.cpp index 1d563d5f1..5852946f9 100644 --- a/src/core/gpu_hw.cpp +++ b/src/core/gpu_hw.cpp @@ -405,31 +405,30 @@ void main() // select the bit for this pixel depending on its offset in the 4-pixel block uint r, g, b; - switch (xoff & 3) + int block_offset = xoff & 3; + if (block_offset == 0) { - case 0: - r = s0 & 0xFFu; - g = s0 >> 8; - b = s1 & 0xFFu; - break; - - case 1: - r = s1 >> 8; - g = s2 & 0xFFu; - b = s2 >> 8; - break; - - case 2: - r = s1 & 0xFFu; - g = s1 >> 8; - b = s2 & 0xFFu; - break; - - case 3: - r = s2 >> 8; - g = s3 & 0xFFu; - b = s3 >> 8; - break; + r = s0 & 0xFFu; + g = s0 >> 8; + b = s1 & 0xFFu; + } + else if (block_offset == 1) + { + r = s1 >> 8; + g = s2 & 0xFFu; + b = s2 >> 8; + } + else if (block_offset == 2) + { + r = s1 & 0xFFu; + g = s1 >> 8; + b = s2 & 0xFFu; + } + else + { + r = s2 >> 8; + g = s3 & 0xFFu; + b = s3 >> 8; } // and normalize diff --git a/src/duckstation/main.cpp b/src/duckstation/main.cpp index e0355df2f..ed8abc837 100644 --- a/src/duckstation/main.cpp +++ b/src/duckstation/main.cpp @@ -86,9 +86,9 @@ static int Run(int argc, char* argv[]) int main(int argc, char* argv[]) { // set log flags - // g_pLog->SetConsoleOutputParams(true, nullptr, LOGLEVEL_DEBUG); + g_pLog->SetConsoleOutputParams(true, nullptr, LOGLEVEL_DEBUG); // g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController", LOGLEVEL_DEBUG); - g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController InterruptController", LOGLEVEL_DEBUG); + // g_pLog->SetConsoleOutputParams(true, "GPU GPU_HW_OpenGL SPU Pad DigitalController InterruptController", LOGLEVEL_DEBUG); #ifdef Y_BUILD_CONFIG_RELEASE g_pLog->SetFilterLevel(LOGLEVEL_INFO);