mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 15:27:46 -04:00
improve cd change handling
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@731 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
2843d00e70
commit
35e3031aaa
5 changed files with 28 additions and 18 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue