X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=frontend%2Fmenu.c;h=5c3824b82b97fb2594aec1b90925ba1f4a510b22;hb=eeb1feebc74be9fb33b145614f1f356f849260e3;hp=6dc62f32a2eb214e639340d256570926d4908990;hpb=e64dc4c54e96643522dc4b8c205d143c7d9b2f1d;p=pcsx_rearmed.git diff --git a/frontend/menu.c b/frontend/menu.c index 6dc62f32..5c3824b8 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -426,7 +426,7 @@ fail: // rrrr rggg gggb bbbb static unsigned short fname2color(const char *fname) { - static const char *cdimg_exts[] = { ".bin", ".img", ".iso", ".cue", ".z", ".bz", ".znx", ".pbp" }; + static const char *cdimg_exts[] = { ".bin", ".img", ".mdf", ".iso", ".cue", ".z", ".bz", ".znx", ".pbp" }; static const char *other_exts[] = { ".ccd", ".toc", ".mds", ".sub", ".table", ".index", ".sbi" }; const char *ext = strrchr(fname, '.'); int i; @@ -444,6 +444,10 @@ static unsigned short fname2color(const char *fname) static void draw_savestate_bg(int slot); +static const char *filter_exts[] = { + ".mp3", ".MP3", ".txt", ".htm", "html", ".jpg", ".pnd" +}; + #define MENU_ALIGN_LEFT #define menu_init menu_init_common #include "common/menu.c" @@ -490,12 +494,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 +513,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);