for (h = me_mfont_h + 1; h > 0; h--)\r
{\r
dst = dest;\r
- for (i = w; i > 0; i--)\r
+ for (i = w - 14; i > 0; i--)\r
*dst++ = menu_sel_color;\r
dest += g_screen_width;\r
}\r
return;\r
}\r
\r
- while (!menu[sel].enabled && sel < menu_sel_max)\r
+ while ((!menu[sel].enabled || !menu[sel].selectable) && sel < menu_sel_max)\r
sel++;\r
\r
/* make sure action buttons are not pressed on entering menu */\r
{\r
const char *p = rom_name + strlen(rom_name);\r
\r
- plat_video_menu_begin();\r
-\r
while (p > rom_name && *p != '/')\r
p--;\r
\r
/* fill both buffers, callbacks won't update in full */\r
+ plat_video_menu_begin();\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
smalltext_out16(1, 10, p, 0xffff);\r
plat_video_menu_end();\r
\r
+ plat_video_menu_begin();\r
smalltext_out16(1, 1, "Loading", 0xffff);\r
smalltext_out16(1, 10, p, 0xffff);\r
plat_video_menu_end();\r
text_out16(x, y, is_loading ? "Load state" : "Save state");\r
y += 3 * me_mfont_h;\r
\r
- menu_draw_selection(x - me_mfont_w * 2, y + menu_sel * me_mfont_h, 13 * me_mfont_w + 4);\r
+ menu_draw_selection(x - me_mfont_w * 2, y + menu_sel * me_mfont_h, (13 + 2) * me_mfont_w + 4);\r
\r
/* draw all 10 slots */\r
for (i = 0; i < 10; i++, y += me_mfont_h)\r
static void draw_key_config(const me_bind_action *opts, int opt_cnt, int player_idx,\r
int sel, int dev_id, int dev_count, int is_bind)\r
{\r
- int x, y, w, i;\r
const char *dev_name;\r
+ int x, y, w, i;\r
\r
- x = g_screen_width / 2 - 20 * me_mfont_w / 2;\r
+ w = ((player_idx >= 0) ? 20 : 30) * me_mfont_w;\r
+ x = g_screen_width / 2 - w / 2;\r
y = (g_screen_height - 4 * me_mfont_h) / 2 - (2 + opt_cnt) * me_mfont_h / 2;\r
if (x < me_mfont_w * 2)\r
x = me_mfont_w * 2;\r
text_out16(x, y, "Emulator controls");\r
\r
y += 2 * me_mfont_h;\r
- menu_draw_selection(x - me_mfont_w * 2, y + sel * me_mfont_h, me_mfont_w); // FIXME last arg\r
+ menu_draw_selection(x - me_mfont_w * 2, y + sel * me_mfont_h, w + 2 * me_mfont_w);\r
\r
for (i = 0; i < opt_cnt; i++, y += me_mfont_h)\r
text_out16(x, y, "%s : %s", opts[i].name,\r
\r
static menu_entry e_menu_main[] =\r
{\r
+ mee_label ("PicoDrive " VERSION),\r
+ mee_label (""),\r
+ mee_label (""),\r
+ mee_label (""),\r
mee_handler_id("Resume game", MA_MAIN_RESUME_GAME, main_menu_handler),\r
mee_handler_id("Save State", MA_MAIN_SAVE_STATE, main_menu_handler),\r
mee_handler_id("Load State", MA_MAIN_LOAD_STATE, main_menu_handler),\r
plat_video_menu_enter(rom_loaded);\r
in_set_blocking(1);\r
me_loop(e_menu_main, &sel);\r
- in_set_blocking(0);\r
\r
- if (rom_loaded && engineState == PGS_Menu) {\r
+ if (rom_loaded) {\r
+ if (engineState == PGS_Menu)\r
+ engineState = PGS_Running;\r
/* wait until menu, ok, back is released */\r
while (in_menu_wait_any(50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK));\r
- engineState = PGS_Running;\r
}\r
+\r
+ in_set_blocking(0);\r
}\r
\r
// --------- CD tray close menu ----------\r
\r
in_set_blocking(1);\r
me_loop(e_menu_tray, &sel);\r
- in_set_blocking(0);\r
\r
if (engineState != PGS_RestartRun) {\r
engineState = PGS_RestartRun;\r
}\r
\r
while (in_menu_wait_any(50) & (PBTN_MENU|PBTN_MOK|PBTN_MBACK));\r
+ in_set_blocking(0);\r
\r
return ret;\r
}\r