Skip to content

Commit

Permalink
Merge pull request #64 from meepingsnesroms/master
Browse files Browse the repository at this point in the history
Fix save path defaulting to root directory
  • Loading branch information
meepingsnesroms committed Oct 28, 2017
2 parents f1f71b3 + 46e819a commit 41f7f15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ static unsigned msx_vdp_synctype;
static bool msx_ym2413_enable;
static bool use_overscan = true;
int msx2_dif = 0;
bool did_reset = false;


void retro_set_video_refresh(retro_video_refresh_t cb) { video_cb = cb; }
Expand Down Expand Up @@ -777,6 +776,13 @@ bool retro_load_game(const struct retro_game_info *info)

propertiesSetDirectory(properties_dir, properties_dir);
machineSetDirectory(machines_dir);

const char *save_dir = NULL;
if(environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &save_dir) && save_dir)
{
boardSetDirectory(save_dir);
}

#if 0
boardSetDirectory(buffer);
#endif
Expand Down Expand Up @@ -824,12 +830,6 @@ bool retro_load_game(const struct retro_game_info *info)
actionInit(video, properties, mixer);
langInit();
tapeSetReadOnly(properties->cassette.readOnly);

const char *save_dir = NULL;
if(environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &save_dir) && save_dir)
{
actionSetQuickSaveSetDirectory(save_dir, ".srm");
}

langSetLanguage(properties->language);

Expand Down

0 comments on commit 41f7f15

Please sign in to comment.