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:
notaz 2007-11-20 21:38:07 +00:00
parent 117f236a4d
commit c633456460
8 changed files with 59 additions and 22 deletions

View file

@ -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();

View file

@ -9,7 +9,7 @@ typedef struct {
// squidgehack, no_save_cfg_on_exit, <unused>, 16_bit_mode
// craigix_ram, confirm_save, show_cd_leds, confirm_load
// A_SNs_gamma, perfect_vsync, giz_scanlines, giz_dblbuff
// vsync_mode, show_clock
// vsync_mode, show_clock, no_frame_limitter
int PicoOpt; // used for config saving only, see Pico.h
int PsndRate; // ditto
int PicoRegion; // ditto

View file

@ -64,11 +64,13 @@ typedef enum
MA_OPT2_RAMTIMINGS, /* gp2x */
MA_OPT2_SQUIDGEHACK, /* gp2x */
MA_OPT2_STATUS_LINE, /* psp */
MA_OPT2_NO_FRAME_LIMIT, /* psp */
MA_OPT2_DONE,
MA_OPT3_SCALE, /* psp (all OPT3) */
MA_OPT3_HSCALE32,
MA_OPT3_HSCALE40,
MA_OPT3_PRES_NOSCALE,
MA_OPT3_PRES_SCALE43,
MA_OPT3_PRES_FULLSCR,
MA_OPT3_FILTERING,
MA_OPT3_VSYNC,