X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fmenu.c;h=57156d577454b54790a1d750b0dff87798078dfb;hp=d99156bcfc65968ed08dd8ae6a24c65ae7827ccf;hb=dd4d5a35678c8ff7f9a7c0ac42be354671534f96;hpb=7badc9353b9570fd1c67827cfb477cef07974ddb diff --git a/frontend/menu.c b/frontend/menu.c index d99156bc..57156d57 100644 --- a/frontend/menu.c +++ b/frontend/menu.c @@ -489,6 +489,10 @@ fail: menu_sync_config(); + // caanoo old config compat hack + if (strcmp(Config.Gpu, "gpuPCSX4ALL.so") == 0) + strcpy(Config.Gpu, "gpu_unai.so"); + // sync plugins for (i = bios_sel = 0; bioses[i] != NULL; i++) if (strcmp(Config.Bios, bioses[i]) == 0) @@ -607,10 +611,10 @@ static void draw_savestate_bg(int slot) bgr888_to_rgb565(d, s, w * 3); else bgr555_to_rgb565(d, s, w * 2); -#ifndef __ARM_ARCH_7A__ - // better darken this on small screens - menu_darken_bg(d, d, w * 2, 0); -#endif + + // darken this so that menu text is visible + if (g_menuscreen_w - w < 320) + menu_darken_bg(d, d, w * 2, 0); } out: @@ -2270,7 +2274,6 @@ void menu_init(void) #endif } -// XXX: should really menu code cotrol the layer size? void menu_notify_mode_change(int w, int h, int bpp) { float mult; @@ -2280,6 +2283,7 @@ void menu_notify_mode_change(int w, int h, int bpp) last_psx_h = h; last_psx_bpp = bpp; + // XXX: should really menu code cotrol the layer size? switch (scaling) { case SCALE_1_1: g_layer_w = w; g_layer_h = h; @@ -2337,16 +2341,24 @@ static void menu_leave_emu(void) plat_video_menu_enter(ready_to_go); memcpy(g_menubg_ptr, g_menubg_src_ptr, g_menuscreen_w * g_menuscreen_h * 2); - if (pl_vout_buf != NULL && ready_to_go && last_psx_bpp == 16) { + if (pl_vout_buf != NULL && ready_to_go) { int x = max(0, g_menuscreen_w - last_psx_w); int y = max(0, g_menuscreen_h / 2 - last_psx_h / 2); int w = min(g_menuscreen_w, last_psx_w); int h = min(g_menuscreen_h, last_psx_h); u16 *d = (u16 *)g_menubg_ptr + g_menuscreen_w * y + x; - u16 *s = pl_vout_buf; + char *s = pl_vout_buf; - for (; h > 0; h--, d += g_menuscreen_w, s += last_psx_w) - menu_darken_bg(d, s, w, 0); + if (last_psx_bpp == 16) { + for (; h > 0; h--, d += g_menuscreen_w, s += last_psx_w * 2) + menu_darken_bg(d, s, w, 0); + } + else { + for (; h > 0; h--, d += g_menuscreen_w, s += last_psx_w * 3) { + bgr888_to_rgb565(d, s, w * 3); + menu_darken_bg(d, d, w, 0); + } + } } if (ready_to_go)