diff options
-rw-r--r-- | frontend/arm_utils.h | 6 | ||||
-rw-r--r-- | frontend/menu.c | 11 | ||||
-rw-r--r-- | frontend/plat_dummy.c | 4 |
3 files changed, 14 insertions, 7 deletions
diff --git a/frontend/arm_utils.h b/frontend/arm_utils.h index a5dcb9b..644143b 100644 --- a/frontend/arm_utils.h +++ b/frontend/arm_utils.h @@ -3,9 +3,9 @@ extern "C" { #endif -void bgr555_to_rgb565(void *dst, void *src, int bytes); -void bgr888_to_rgb888(void *dst, void *src, int bytes); -void bgr888_to_rgb565(void *dst, void *src, int bytes); +void bgr555_to_rgb565(void *dst, const void *src, int bytes); +void bgr888_to_rgb888(void *dst, const void *src, int bytes); +void bgr888_to_rgb565(void *dst, const void *src, int bytes); #ifdef __cplusplus } diff --git a/frontend/menu.c b/frontend/menu.c index 6dc62f3..baf7f2c 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -490,12 +490,12 @@ static void draw_savestate_bg(int slot) memcpy(g_menubg_ptr, g_menubg_src_ptr, g_menuscreen_w * g_menuscreen_h * 2); - if ((gpu->ulStatus & 0x800000) || (gpu->ulStatus & 0x200000)) - goto out; // disabled || 24bpp (NYET) + if (gpu->ulStatus & 0x800000) + goto out; // disabled x = gpu->ulControl[5] & 0x3ff; y = (gpu->ulControl[5] >> 10) & 0x1ff; - s = (u16 *)gpu->psxVRam + y * 1024 + (x & ~3); + s = (u16 *)gpu->psxVRam + y * 1024 + (x & ~1); w = psx_widths[(gpu->ulStatus >> 16) & 7]; tmp = gpu->ulControl[7]; h = ((tmp >> 10) & 0x3ff) - (tmp & 0x3ff); @@ -509,7 +509,10 @@ static void draw_savestate_bg(int slot) d = (u16 *)g_menubg_ptr + g_menuscreen_w * y + x; for (; h > 0; h--, d += g_menuscreen_w, s += 1024) - bgr555_to_rgb565(d, s, w * 2); + if (gpu->ulStatus & 0x200000) + bgr888_to_rgb565(d, s, w * 3); + else + bgr555_to_rgb565(d, s, w * 2); out: free(gpu); diff --git a/frontend/plat_dummy.c b/frontend/plat_dummy.c index a43662b..44ba4a8 100644 --- a/frontend/plat_dummy.c +++ b/frontend/plat_dummy.c @@ -51,6 +51,10 @@ void bgr888_to_rgb888(void *d, void *s, int len) { } +void bgr888_to_rgb565(void *d, void *s, int len) +{ +} + void in_update_analogs(void) { } |