diff options
author | radius | 2015-09-13 23:26:57 -0500 |
---|---|---|
committer | radius | 2015-09-13 23:26:57 -0500 |
commit | d9819d3aaa63665340dac3589b71759dd39df7e2 (patch) | |
tree | 7ddc1dfc618f7b93c2c33b50a600a76187c4bd52 | |
parent | 8635a82e48998eac56b08b98f53a2b58e12fd4c9 (diff) | |
download | snesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.tar.gz snesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.tar.bz2 snesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.zip |
fix the last commit, now it loads fine
-rw-r--r-- | libretro.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -884,10 +884,20 @@ bool retro_load_game(const struct retro_game_info* game) Settings.FrameTime = (Settings.PAL ? Settings.FrameTimePAL : Settings.FrameTimeNTSC); - if(retro_save_directory[0] == '\0') - LoadSRAM(S9xGetFilename("srm")); - else + + const char *dir = NULL; + if (environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &dir) && dir) + { + GetBaseName(""); + snprintf(retro_save_directory,sizeof(retro_save_directory),"%s%c%s.srm",dir,slash,retro_base_name); + log_cb(RETRO_LOG_INFO, + "SAVE LOCATION: %s\n", retro_save_directory); + } + + if(retro_save_directory[0] != '\0') LoadSRAM(retro_save_directory); + else + LoadSRAM(S9xGetFilename("srm")); struct retro_system_av_info av_info; retro_get_system_av_info(&av_info); @@ -899,16 +909,6 @@ bool retro_load_game(const struct retro_game_info* game) #else S9xSetPlaybackRate(av_info.timing.sample_rate); #endif - - const char *dir = NULL; - if (environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &dir) && dir) - { - GetBaseName(""); - snprintf(retro_save_directory,sizeof(retro_save_directory),"%s%c%s.srm",dir,slash,retro_base_name); - log_cb(RETRO_LOG_INFO, - "SAVE LOCATION: %s\n", retro_save_directory); - } - return true; } |