X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fcommon%2Fmenu.c;h=44fb5c800607832473818d2ae806ed2a1fc71c94;hb=35e3031aaab69be3703de3b6ce0cfa64aae5ece8;hp=5fc2a5768defa9f9951d952ad5a7f334f4d0479e;hpb=2843d00e70d545a0d336a38851ca97ad15f1dff2;p=picodrive.git diff --git a/platform/common/menu.c b/platform/common/menu.c index 5fc2a57..44fb5c8 100644 --- a/platform/common/menu.c +++ b/platform/common/menu.c @@ -1968,24 +1968,14 @@ void menu_loop(void) static int mh_tray_load_cd(menu_id id, int keys) { - cd_img_type cd_type; char *ret_name; - int ret = -1; ret_name = romsel_run(); if (ret_name == NULL) return 0; - cd_type = emu_cd_check(NULL, ret_name); - if (cd_type != CIT_NOT_CD) - ret = Insert_CD(ret_name, cd_type); - if (ret != 0) { - me_update_msg("Load failed, invalid CD image?"); - return 0; - } - engineState = PGS_RestartRun; - return 1; + return emu_swap_cd(ret_name); } static int mh_tray_nothing(menu_id id, int keys) @@ -2001,6 +1991,7 @@ static menu_entry e_menu_tray[] = mee_label (""), mee_handler("Load CD image", mh_tray_load_cd), mee_handler("Insert nothing", mh_tray_nothing), + mee_end, }; int menu_loop_tray(void)