mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Update libretro.h docs. Fix conditional string check.
This commit is contained in:
parent
6578bd65c3
commit
c9854deeec
@ -612,12 +612,12 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
|
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);
|
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n", g_settings.system_directory);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY:
|
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);
|
RARCH_LOG("Environ SAVE_DIRECTORY: \"%s\".\n", g_extern.savefile_dir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
10
libretro.h
10
libretro.h
@ -413,6 +413,9 @@ enum retro_mod
|
|||||||
// If so, no such directory is defined,
|
// If so, no such directory is defined,
|
||||||
// and it's up to the implementation to find a suitable directory.
|
// 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
|
#define RETRO_ENVIRONMENT_SET_PIXEL_FORMAT 10
|
||||||
// const enum retro_pixel_format * --
|
// const enum retro_pixel_format * --
|
||||||
// Sets the internal pixel format used by the implementation.
|
// Sets the internal pixel format used by the implementation.
|
||||||
@ -578,7 +581,12 @@ enum retro_mod
|
|||||||
#define RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY 31
|
#define RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY 31
|
||||||
// const char ** --
|
// const char ** --
|
||||||
// Returns the "save" directory of the frontend.
|
// 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
|
enum retro_log_level
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user