mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-11-10 21:05:12 +01:00
[Core/MCD] improved ROM file extension renaming to .iso for games with CD support
This commit is contained in:
parent
4a41e0cca7
commit
935a1f68dc
@ -735,19 +735,21 @@ int load_rom(char *filename)
|
||||
/* try to load CD BOOTROM */
|
||||
if (load_bios())
|
||||
{
|
||||
char *ptr;
|
||||
char fname[256];
|
||||
int len = strlen(filename);
|
||||
|
||||
/* boot from cartridge */
|
||||
scd.cartridge.boot = 0x40;
|
||||
|
||||
/* automatically load associated .iso image */
|
||||
strncpy(fname, filename, 256);
|
||||
ptr = strchr(fname,'.');
|
||||
if (ptr && (ptr < &fname[252]))
|
||||
/* change ROM filename extension to .iso */
|
||||
while (len && (filename[len-1] != '.')) len--;
|
||||
if (len < 253)
|
||||
{
|
||||
strcpy(ptr+1,"iso");
|
||||
strncpy(fname, filename, len);
|
||||
strcpy(&fname[len], "iso");
|
||||
}
|
||||
|
||||
/* automatically load associated .iso image */
|
||||
cdd_load(fname, (char *)cdc.ram);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user