mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 14:57:46 -04:00
1.35a psp bugfix release
git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@300 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
117f236a4d
commit
c633456460
8 changed files with 59 additions and 22 deletions
22
common/emu.c
22
common/emu.c
|
@ -137,6 +137,19 @@ int emu_findBios(int region, char **bios_file)
|
|||
}
|
||||
}
|
||||
|
||||
/* check if the name begins with BIOS name */
|
||||
static int emu_isBios(const char *name)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < sizeof(biosfiles_us)/sizeof(biosfiles_us[0]); i++)
|
||||
if (strstr(name, biosfiles_us[i]) != NULL) return 1;
|
||||
for (i = 0; i < sizeof(biosfiles_eu)/sizeof(biosfiles_eu[0]); i++)
|
||||
if (strstr(name, biosfiles_eu[i]) != NULL) return 1;
|
||||
for (i = 0; i < sizeof(biosfiles_jp)/sizeof(biosfiles_jp[0]); i++)
|
||||
if (strstr(name, biosfiles_jp[i]) != NULL) return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* checks if romFileName points to valid MegaCD image
|
||||
* if so, checks for suitable BIOS */
|
||||
int emu_cdCheck(int *pregion)
|
||||
|
@ -340,9 +353,12 @@ int emu_ReloadRom(void)
|
|||
|
||||
menu_romload_end();
|
||||
|
||||
// emu_ReadConfig() might have messed currentConfig.lastRomFile
|
||||
strncpy(currentConfig.lastRomFile, romFileName, sizeof(currentConfig.lastRomFile)-1);
|
||||
currentConfig.lastRomFile[sizeof(currentConfig.lastRomFile)-1] = 0;
|
||||
if (!emu_isBios(romFileName))
|
||||
{
|
||||
// emu_ReadConfig() might have messed currentConfig.lastRomFile
|
||||
strncpy(currentConfig.lastRomFile, romFileName, sizeof(currentConfig.lastRomFile)-1);
|
||||
currentConfig.lastRomFile[sizeof(currentConfig.lastRomFile)-1] = 0;
|
||||
}
|
||||
|
||||
if (PicoPatches) {
|
||||
PicoPatchPrepare();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue