X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Fcommon%2Fmenu.c;h=f7085fa6be5d92b236a277abaa7487bbb3dea2f4;hp=a571ddd15a71205345bdeefc45a8a365bd57b174;hb=fba064572196c69de43e3c69245369d94d3be929;hpb=9564e73db83552dd7992c633362b0d99e14a4453 diff --git a/frontend/common/menu.c b/frontend/common/menu.c index a571ddd1..f7085fa6 100644 --- a/frontend/common/menu.c +++ b/frontend/common/menu.c @@ -341,26 +341,6 @@ static void menu_darken_bg(void *dst, void *src, int pixels, int darker) } } -static void menu_enter(int is_rom_loaded) -{ - if (is_rom_loaded) - { - // darken the active framebuffer - menu_darken_bg(g_menubg_ptr, g_menubg_src_ptr, g_menuscreen_w * g_menuscreen_h, 1); - } - else - { - char buff[256]; - - // should really only happen once, on startup.. - emu_make_path(buff, "skin/background.png", sizeof(buff)); - if (readpng(g_menubg_ptr, buff, READPNG_BG, g_menuscreen_w, g_menuscreen_h) < 0) - memset(g_menubg_ptr, 0, g_menuscreen_w * g_menuscreen_h * 2); - } - - plat_video_menu_enter(is_rom_loaded); -} - static int me_id2offset(const menu_entry *ent, menu_id id) { int i; @@ -461,8 +441,11 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void)) h = g_menuscreen_h; } - x = g_menuscreen_w / 2 - w / 2; + x = g_menuscreen_w / 2 - w / 2; y = g_menuscreen_h / 2 - h / 2; +#ifdef MENU_ALIGN_LEFT + if (x > 12) x = 12; +#endif /* draw */ menu_draw_begin(1); @@ -511,7 +494,7 @@ static void me_draw(const menu_entry *entries, int sel, void (*draw_more)(void)) len = strlen(names[i]); if (len > 10) offs = 10 - len - 2; - if (i == *(int *)ent->var) { + if (i == *(unsigned char *)ent->var) { text_out16(x + col2_offs + offs * me_mfont_w, y, "%s", names[i]); break; }