cscpace: fix more alignment issues
[pcsx_rearmed.git] / frontend / plugin_lib.c
index ca68694..d5cec76 100644 (file)
@@ -313,6 +313,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h)
        unsigned char *dest = pl_vout_buf;
        const unsigned short *src = vram;
        int dstride = pl_vout_w, h1 = h;
+       int h_full = pl_vout_h - pl_vout_yoffset;
        int doffs;
 
        pcnt_start(PCNT_BLIT);
@@ -323,7 +324,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h)
                        pl_plat_clear();
                else
                        memset(pl_vout_buf, 0,
-                               dstride * pl_vout_h * pl_vout_bpp / 8);
+                               dstride * h_full * pl_vout_bpp / 8);
                goto out_hud;
        }
 
@@ -339,7 +340,7 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h)
                        pl_plat_clear();
                else
                        memset(pl_vout_buf, 0,
-                               dstride * pl_vout_h * pl_vout_bpp / 8);
+                               dstride * h_full * pl_vout_bpp / 8);
                clear_counter--;
        }
 
@@ -401,8 +402,6 @@ static void pl_vout_flip(const void *vram, int stride, int bgr24, int w, int h)
 #endif
        else
        {
-               src = (void *)((uintptr_t)src & ~3); // align for the blitter
-
                for (; h1-- > 0; dest += dstride * 2, src += stride)
                {
                        bgr555_to_rgb565(dest, src, w * 2);
@@ -599,7 +598,6 @@ static void update_analogs(void)
                }
 
        }
-       //printf("%4d %4d %4d %4d\n", in_a1[0], in_a1[1], in_a2[0], in_a2[1]);
 }
 
 static void update_input(void)