From: notaz Date: Thu, 1 Jan 2009 22:28:03 +0000 (+0000) Subject: moved writelrom to use global path X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f3b59cfbc4a85e2b2f036b0ae3fce09a94ed919;p=libpicofe.git moved writelrom to use global path git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@625 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/common/emu.c b/common/emu.c index 73ca01b..58fee61 100644 --- a/common/emu.c +++ b/common/emu.c @@ -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 void emu_textOut8(int x, int y, const char *text) { diff --git a/common/emu.h b/common/emu.h index e05f365..ba5cf43 100644 --- a/common/emu.h +++ b/common/emu.h @@ -13,6 +13,7 @@ extern "C" { #define EOPT_SHOW_FPS (1<<1) #define EOPT_EN_SOUND (1<<2) #define EOPT_GZIP_SAVES (1<<3) +#define EOPT_NO_AUTOSVCFG (1<<5) typedef struct _currentConfig_t { // char lastRomFile[512]; @@ -58,6 +59,7 @@ int emu_ReloadRom(char *rom_fname); int emu_SaveLoadGame(int load, int sram); int emu_ReadConfig(int game, int no_defaults); int emu_WriteConfig(int game); +void emu_writelrom(void); char *emu_GetSaveFName(int load, int is_sram, int slot); int emu_checkSaveFile(int slot); void emu_setSaveStateCbs(int gz); diff --git a/gp2x/emu.c b/gp2x/emu.c index c696d88..aef34b0 100644 --- a/gp2x/emu.c +++ b/gp2x/emu.c @@ -123,12 +123,8 @@ void emu_Deinit(void) SRam.changed = 0; } - if (!(currentConfig.EmuOpt & 0x20)) { - config_writelrom(PicoConfigFile); -#ifndef NO_SYNC - sync(); -#endif - } + if (!(currentConfig.EmuOpt & EOPT_NO_AUTOSVCFG)) + emu_writelrom(); free(PicoDraw2FB);