gpulib: implement rgb888_to_rgb565
[pcsx_rearmed.git] / frontend / menu.c
index d34b7f9..3152cb2 100644 (file)
@@ -590,7 +590,7 @@ static void draw_savestate_bg(int slot)
 
        x = gpu->ulControl[5] & 0x3ff;
        y = (gpu->ulControl[5] >> 10) & 0x1ff;
-       s = (u16 *)gpu->psxVRam + y * 1024 + (x & ~1);
+       s = (u16 *)gpu->psxVRam + y * 1024 + x;
        w = psx_widths[(gpu->ulStatus >> 16) & 7];
        tmp = gpu->ulControl[7];
        h = ((tmp >> 10) & 0x3ff) - (tmp & 0x3ff);
@@ -1444,8 +1444,8 @@ static void debug_menu_loop(void)
                if      (inp & PBTN_MBACK) break;
                else if (inp & PBTN_UP)    { if (df_y > 0) df_y--; }
                else if (inp & PBTN_DOWN)  { if (df_y < 512 - g_menuscreen_h) df_y++; }
-               else if (inp & PBTN_LEFT)  { if (df_x > 0) df_x--; }
-               else if (inp & PBTN_RIGHT) { if (df_x < 1024 - g_menuscreen_w) df_x++; }
+               else if (inp & PBTN_LEFT)  { if (df_x > 0) df_x -= 2; }
+               else if (inp & PBTN_RIGHT) { if (df_x < 1024 - g_menuscreen_w) df_x += 2; }
        }
 
        free(gpuf);
@@ -2242,7 +2242,7 @@ static void menu_leave_emu(void)
                }
                else {
                        for (; h > 0; h--, d += g_menuscreen_w, s += last_psx_w * 3) {
-                               bgr888_to_rgb565(d, s, w * 3);
+                               rgb888_to_rgb565(d, s, w * 3);
                                menu_darken_bg(d, d, w, 0);
                        }
                }