if (shadow_size < 320 * 480 * 2)
                shadow_size = 320 * 480 * 2;
 
-       shadow_fb = malloc(shadow_size);
+       shadow_fb = calloc(1, shadow_size);
        g_menubg_ptr = calloc(1, shadow_size);
        if (shadow_fb == NULL || g_menubg_ptr == NULL) {
                fprintf(stderr, "OOM\n");
 
        int led_reg, pitch, scr_offs, led_offs;\r
        led_reg = Pico_mcd->s68k_regs[0];\r
 \r
-       pitch = 320;\r
+       pitch = g_screen_ppitch;\r
        led_offs = 4;\r
        scr_offs = pitch * 2 + 4;\r
 \r
+#if 0\r
        if (currentConfig.renderer != RT_16BIT) {\r
        #define p(x) px[(x) >> 2]\r
                // 8-bit modes\r
                p(pitch*0) = p(pitch*1) = p(pitch*2) = col_g;\r
                p(pitch*0 + led_offs) = p(pitch*1 + led_offs) = p(pitch*2 + led_offs) = col_r;\r
        #undef p\r
-       } else {\r
+       } else\r
+#endif\r
+       {\r
        #define p(x) px[(x)*2 >> 2] = px[((x)*2 >> 2) + 1]\r
                // 16-bit modes\r
                unsigned int *px = (unsigned int *)((short *)g_screen_ptr + scr_offs);\r