aboutsummaryrefslogtreecommitdiff
path: root/frontend/menu.c
diff options
context:
space:
mode:
authornotaz2011-06-19 02:21:10 +0300
committernotaz2011-07-08 00:15:06 +0300
commitff847a2ebb9f89594332aeb52cecfa0bd51669b7 (patch)
tree4584162ecb32313c0409e7443a13266939210cf3 /frontend/menu.c
parente64dc4c54e96643522dc4b8c205d143c7d9b2f1d (diff)
downloadpcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.tar.gz
pcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.tar.bz2
pcsx_rearmed-ff847a2ebb9f89594332aeb52cecfa0bd51669b7.zip
frontend: handle 24bpp in sstate preview
Diffstat (limited to 'frontend/menu.c')
-rw-r--r--frontend/menu.c11
1 files changed, 7 insertions, 4 deletions
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);