aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorradius2015-09-13 23:26:57 -0500
committerradius2015-09-13 23:26:57 -0500
commitd9819d3aaa63665340dac3589b71759dd39df7e2 (patch)
tree7ddc1dfc618f7b93c2c33b50a600a76187c4bd52
parent8635a82e48998eac56b08b98f53a2b58e12fd4c9 (diff)
downloadsnesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.tar.gz
snesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.tar.bz2
snesemu-d9819d3aaa63665340dac3589b71759dd39df7e2.zip
fix the last commit, now it loads fine
-rw-r--r--libretro.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libretro.c b/libretro.c
index 789e621..63831a0 100644
--- a/libretro.c
+++ b/libretro.c
@@ -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;
}