frontend: minor tweaks
[pcsx_rearmed.git] / frontend / menu.c
index d99156b..65f7b98 100644 (file)
@@ -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:
@@ -1694,11 +1698,14 @@ static void menu_bios_warn(void)
                "The file is usually named SCPH1001.BIN,\n"
                "but other not compressed files can be\n"
                "used too.\n\n"
-               "Press (B) or (X) to continue";
+               "Press %s or %s to continue";
+       char tmp_msg[sizeof(msg) + 64];
 
+       snprintf(tmp_msg, sizeof(tmp_msg), msg,
+               in_get_key_name(-1, -PBTN_MOK), in_get_key_name(-1, -PBTN_MBACK));
        while (1)
        {
-               draw_menu_message(msg, NULL);
+               draw_menu_message(tmp_msg, NULL);
 
                inp = in_menu_wait(PBTN_MOK|PBTN_MBACK, 70);
                if (inp & (PBTN_MBACK|PBTN_MOK))
@@ -2270,7 +2277,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 +2286,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 +2344,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)