moved writelrom to use global path

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@625 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-01-01 22:28:03 +00:00
parent 3427e57362
commit d7dd4d66ce
3 changed files with 14 additions and 6 deletions

View file

@ -670,6 +670,16 @@ int emu_WriteConfig(int is_game)
} }
void emu_writelrom(void)
{
char cfg[512];
make_config_cfg(cfg);
config_writelrom(cfg);
#ifndef NO_SYNC
sync();
#endif
}
#ifndef UIQ3 #ifndef UIQ3
void emu_textOut8(int x, int y, const char *text) void emu_textOut8(int x, int y, const char *text)
{ {

View file

@ -13,6 +13,7 @@ extern "C" {
#define EOPT_SHOW_FPS (1<<1) #define EOPT_SHOW_FPS (1<<1)
#define EOPT_EN_SOUND (1<<2) #define EOPT_EN_SOUND (1<<2)
#define EOPT_GZIP_SAVES (1<<3) #define EOPT_GZIP_SAVES (1<<3)
#define EOPT_NO_AUTOSVCFG (1<<5)
typedef struct _currentConfig_t { typedef struct _currentConfig_t {
// char lastRomFile[512]; // char lastRomFile[512];
@ -58,6 +59,7 @@ int emu_ReloadRom(char *rom_fname);
int emu_SaveLoadGame(int load, int sram); int emu_SaveLoadGame(int load, int sram);
int emu_ReadConfig(int game, int no_defaults); int emu_ReadConfig(int game, int no_defaults);
int emu_WriteConfig(int game); int emu_WriteConfig(int game);
void emu_writelrom(void);
char *emu_GetSaveFName(int load, int is_sram, int slot); char *emu_GetSaveFName(int load, int is_sram, int slot);
int emu_checkSaveFile(int slot); int emu_checkSaveFile(int slot);
void emu_setSaveStateCbs(int gz); void emu_setSaveStateCbs(int gz);

View file

@ -123,12 +123,8 @@ void emu_Deinit(void)
SRam.changed = 0; SRam.changed = 0;
} }
if (!(currentConfig.EmuOpt & 0x20)) { if (!(currentConfig.EmuOpt & EOPT_NO_AUTOSVCFG))
config_writelrom(PicoConfigFile); emu_writelrom();
#ifndef NO_SYNC
sync();
#endif
}
free(PicoDraw2FB); free(PicoDraw2FB);