aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotaz2011-06-19 02:21:10 +0300
committernotaz2011-07-08 00:15:06 +0300
commitff847a2ebb9f89594332aeb52cecfa0bd51669b7 (patch)
tree4584162ecb32313c0409e7443a13266939210cf3
parente64dc4c54e96643522dc4b8c205d143c7d9b2f1d (diff)
downloadpcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.tar.gz
pcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.tar.bz2
pcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.zip
frontend: handle 24bpp in sstate preview
-rw-r--r--frontend/arm_utils.h6
-rw-r--r--frontend/menu.c11
-rw-r--r--frontend/plat_dummy.c4
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)
{
}