Update libretro.h docs. Fix conditional string check.

This commit is contained in:
Themaister 2014-02-07 09:32:15 +01:00
parent 6578bd65c3
commit c9854deeec
2 changed files with 11 additions and 3 deletions

View File

@ -612,12 +612,12 @@ bool rarch_environment_cb(unsigned cmd, void *data)
break;
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
*(const char **)data = *g_settings.system_directory ? g_settings.system_directory : NULL;
*(const char**)data = *g_settings.system_directory ? g_settings.system_directory : NULL;
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n", g_settings.system_directory);
break;
case RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY:
*(const char **)data = g_extern.savefile_dir ? g_extern.savefile_dir : NULL;
*(const char**)data = *g_extern.savefile_dir ? g_extern.savefile_dir : NULL;
RARCH_LOG("Environ SAVE_DIRECTORY: \"%s\".\n", g_extern.savefile_dir);
break;

View File

@ -413,6 +413,9 @@ enum retro_mod
// If so, no such directory is defined,
// and it's up to the implementation to find a suitable directory.
//
// NOTE: Some cores used this folder also for "save" data such as memory cards, etc, for lack of a better place to put it.
// This is now discouraged, and if possible, cores should try to use the new GET_SAVE_DIRECTORY.
//
#define RETRO_ENVIRONMENT_SET_PIXEL_FORMAT 10
// const enum retro_pixel_format * --
// Sets the internal pixel format used by the implementation.
@ -578,7 +581,12 @@ enum retro_mod
#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
// This directory can be used to store SRAM, memory cards, high scores, etc, if the libretro core
// cannot use the regular memory interface (retro_get_memory_data()).
//
// NOTE: libretro cores used to check GET_SYSTEM_DIRECTORY for similar things before.
// They should still check GET_SYSTEM_DIRECTORY if they want to be backwards compatible.
// The path here can be NULL. It should only be non-NULL if the frontend user has set a specific save path.
enum retro_log_level
{