diff --git a/dynamic.c b/dynamic.c index 44067e7f56..a299c75d5e 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1,4 +1,4 @@ -/* RetroArch - A frontend for libretro. + /* RetroArch - A frontend for libretro. * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -616,6 +616,11 @@ bool rarch_environment_cb(unsigned cmd, void *data) RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n", g_settings.system_directory); break; + case RETRO_ENVIRONMENT_GET_SRAM_DIRECTORY: + *(const char **)data = g_extern.savefile_dir ? g_extern.savefile_dir : NULL; + RARCH_LOG("Environ SAVE_DIRECTORY: \"%s\".\n", g_extern.savefile_dir); + break; + case RETRO_ENVIRONMENT_SET_PIXEL_FORMAT: { enum retro_pixel_format pix_fmt = *(const enum retro_pixel_format*)data; diff --git a/libretro.h b/libretro.h index 98984c229b..1c4a3f3d4b 100755 --- a/libretro.h +++ b/libretro.h @@ -575,6 +575,10 @@ enum retro_mod // If so, no such directory is defined, // and it's up to the implementation to find a suitable directory. // +#define RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY 31 + // const char ** -- + // Returns the "save" directory of the frontend. + // This directory can be used to store SRAM, memory cards, high scores, etc enum retro_log_level {