mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
cdrom: add PC Engine CD detection
This commit is contained in:
parent
39187f33b1
commit
a191112634
@ -34,7 +34,8 @@ enum media_detect_cd_system
|
||||
MEDIA_CD_SYSTEM_SATURN,
|
||||
MEDIA_CD_SYSTEM_DREAMCAST,
|
||||
MEDIA_CD_SYSTEM_PSX,
|
||||
MEDIA_CD_SYSTEM_3DO
|
||||
MEDIA_CD_SYSTEM_3DO,
|
||||
MEDIA_CD_SYSTEM_PC_ENGINE_CD
|
||||
};
|
||||
|
||||
typedef struct
|
||||
|
@ -265,6 +265,12 @@ bool media_detect_cd_info(const char *path, media_detect_cd_info_t *info)
|
||||
|
||||
strlcpy(info->system, "3DO", sizeof(info->system));
|
||||
}
|
||||
else if (!memcmp(buf + offset + 0x950, "PC Engine CD-ROM SYSTEM", 23))
|
||||
{
|
||||
info->system_id = MEDIA_CD_SYSTEM_PC_ENGINE_CD;
|
||||
|
||||
strlcpy(info->system, "TurboGrafx-CD / PC-Engine CD", sizeof(info->system));
|
||||
}
|
||||
|
||||
free(buf);
|
||||
}
|
||||
|
@ -5015,13 +5015,27 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
if (file)
|
||||
{
|
||||
const cdrom_toc_t *toc = retro_vfs_file_get_cdrom_toc();
|
||||
unsigned first_data_track = 1;
|
||||
|
||||
atip = cdrom_has_atip(filestream_get_vfs_handle(file));
|
||||
|
||||
filestream_close(file);
|
||||
|
||||
/* open first track */
|
||||
cdrom_device_fillpath(file_path, sizeof(file_path), drive, 1, false);
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < toc->num_tracks; i++)
|
||||
{
|
||||
if (!toc->track[i].audio)
|
||||
{
|
||||
first_data_track = i + 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* open first data track */
|
||||
cdrom_device_fillpath(file_path, sizeof(file_path), drive, first_data_track, false);
|
||||
|
||||
if (media_detect_cd_info(file_path, &cd_info))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user