From: notaz Date: Thu, 1 Jan 2009 22:28:03 +0000 (+0000) Subject: moved writelrom to use global path X-Git-Tag: v1.85~374 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7dd4d66ce60e878852d01a1cde95384d35d0a77;p=picodrive.git moved writelrom to use global path git-svn-id: file:///home/notaz/opt/svn/PicoDrive@625 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/platform/common/emu.c b/platform/common/emu.c index 73ca01bb..58fee619 100644 --- a/platform/common/emu.c +++ b/platform/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/platform/common/emu.h b/platform/common/emu.h index e05f365b..ba5cf43a 100644 --- a/platform/common/emu.h +++ b/platform/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/platform/gp2x/emu.c b/platform/gp2x/emu.c index c696d887..aef34b0d 100644 --- a/platform/gp2x/emu.c +++ b/platform/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);