Support RETRO_ENVIRONMENT_GET_FILE_BROWSER_START_DIRECTORY (#17002)

This commit is contained in:
zoltanvb 2024-09-14 21:15:27 +02:00 committed by GitHub
parent 580efd41e4
commit 39c48f7310
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 0 deletions

View File

@ -2556,6 +2556,19 @@ enum retro_mod
*/
#define RETRO_ENVIRONMENT_GET_PLAYLIST_DIRECTORY 79
/**
* Returns the "file browser" start directory of the frontend.
*
* This directory can serve as a start directory for the core in case it
* provides an internal way of loading content.
*
* @param[out] data <tt>const char **</tt>.
* May be \c NULL. If so, no such directory is defined, and it's up to the
* implementation to find a suitable directory.
* @return \c true if the environment call is available.
*/
#define RETRO_ENVIRONMENT_GET_FILE_BROWSER_START_DIRECTORY 80
/**@}*/
/**

View File

@ -2639,6 +2639,17 @@ bool runloop_environment_cb(unsigned cmd, void *data)
break;
}
case RETRO_ENVIRONMENT_GET_FILE_BROWSER_START_DIRECTORY:
{
const char **dir = (const char**)data;
const char *dir_content = settings->paths.directory_menu_content;
*dir = *dir_content ? dir_content : NULL;
RARCH_LOG("[Environ]: FILE_BROWSER_START_DIRECTORY: \"%s\".\n",
dir_content);
break;
}
case RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO:
/**
* Update the system Audio/Video information.