mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
Be consistent with frontend_driver_get_core_extension - core extension
var should at most be 16 chars big, make only one exception once
This commit is contained in:
parent
1765d491d1
commit
40a0ced947
@ -948,9 +948,8 @@ bool audio_driver_dsp_filter_init(const char *device)
|
||||
retro_dsp_filter_t *audio_driver_dsp = NULL;
|
||||
struct string_list *plugs = NULL;
|
||||
#if defined(HAVE_DYLIB) && !defined(HAVE_FILTERS_BUILTIN)
|
||||
char ext_name[32];
|
||||
char ext_name[16];
|
||||
char basedir[256];
|
||||
ext_name[0] = '\0';
|
||||
fill_pathname_basedir(basedir, device, sizeof(basedir));
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
return false;
|
||||
|
@ -174,11 +174,9 @@ bool core_backup_get_backup_path(
|
||||
/* Returns detected type of specified core backup file */
|
||||
enum core_backup_type core_backup_get_backup_type(const char *backup_path)
|
||||
{
|
||||
char core_ext[16];
|
||||
const char *backup_ext = NULL;
|
||||
struct string_list *metadata_list = NULL;
|
||||
char core_ext[255];
|
||||
|
||||
core_ext[0] = '\0';
|
||||
|
||||
if (string_is_empty(backup_path) || !path_is_valid(backup_path))
|
||||
goto error;
|
||||
|
@ -164,15 +164,12 @@ static void salamander_init(char *s, size_t len)
|
||||
|
||||
if (!config_valid)
|
||||
{
|
||||
char executable_name[PATH_MAX_LENGTH];
|
||||
|
||||
executable_name[0] = '\0';
|
||||
|
||||
char core_ext[16];
|
||||
/* No config file - search filesystem for
|
||||
* first available core */
|
||||
frontend_driver_get_core_extension(
|
||||
executable_name, sizeof(executable_name));
|
||||
find_and_set_first_file(s, len, executable_name);
|
||||
core_ext, sizeof(core_ext));
|
||||
find_and_set_first_file(s, len, core_ext);
|
||||
|
||||
/* Save result to new config file */
|
||||
if (!string_is_empty(s))
|
||||
|
@ -1574,9 +1574,7 @@ static unsigned menu_displaylist_parse_supported_cores(menu_displaylist_info_t *
|
||||
* selection of this core
|
||||
* 3) Hope that the user does not attempt to
|
||||
* load unsupported content... */
|
||||
char exts[32];
|
||||
exts[0] = '\0';
|
||||
|
||||
char exts[16];
|
||||
/* Attempt to identify 'broken' platforms by fetching
|
||||
* the core file extension - if there is none, then
|
||||
* it is impossible for RetroArch to populate a
|
||||
@ -14626,8 +14624,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
break;
|
||||
case DISPLAYLIST_FILE_BROWSER_SELECT_SIDELOAD_CORE:
|
||||
{
|
||||
char ext_names[NAME_MAX_LENGTH];
|
||||
ext_names[0] = '\0';
|
||||
char ext_names[32];
|
||||
|
||||
info->type_default = FILE_TYPE_SIDELOAD_CORE;
|
||||
|
||||
@ -14682,9 +14679,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
menu_entries_clear(info->list);
|
||||
{
|
||||
char ext_name[16];
|
||||
|
||||
ext_name[0] = '\0';
|
||||
|
||||
filebrowser_clear_type();
|
||||
info->type_default = FILE_TYPE_PLAIN;
|
||||
if (frontend_driver_get_core_extension(
|
||||
|
@ -9489,10 +9489,7 @@ static bool setting_append_list(
|
||||
if (frontend_driver_has_fork())
|
||||
#endif
|
||||
{
|
||||
char ext_name[255];
|
||||
|
||||
ext_name[0] = '\0';
|
||||
|
||||
char ext_name[16];
|
||||
if (frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
{
|
||||
CONFIG_ACTION(
|
||||
|
14
retroarch.c
14
retroarch.c
@ -1368,7 +1368,7 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
char ext_shaders[255];
|
||||
#endif
|
||||
char ext_name[255];
|
||||
char ext_name[16];
|
||||
const char *exts = NULL;
|
||||
bool recursive = false;
|
||||
|
||||
@ -1378,11 +1378,8 @@ struct string_list *dir_list_new_special(const char *input_dir,
|
||||
exts = filter;
|
||||
break;
|
||||
case DIR_LIST_CORES:
|
||||
ext_name[0] = '\0';
|
||||
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
return NULL;
|
||||
|
||||
exts = ext_name;
|
||||
break;
|
||||
case DIR_LIST_RECURSIVE:
|
||||
@ -3256,14 +3253,12 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
case CMD_EVENT_CORE_INFO_INIT:
|
||||
{
|
||||
char ext_name[255];
|
||||
char ext_name[16];
|
||||
const char *dir_libretro = settings->paths.directory_libretro;
|
||||
const char *path_libretro_info = settings->paths.path_libretro_info;
|
||||
bool show_hidden_files = settings->bools.show_hidden_files;
|
||||
bool core_info_cache_enable = settings->bools.core_info_cache_enable;
|
||||
|
||||
ext_name[0] = '\0';
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL);
|
||||
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
@ -5473,10 +5468,7 @@ static void retroarch_parse_input_libretro_path(const char *path)
|
||||
|
||||
if (!string_is_empty(path_ext))
|
||||
{
|
||||
char core_ext[255];
|
||||
|
||||
core_ext[0] = '\0';
|
||||
|
||||
char core_ext[16];
|
||||
if ( string_is_empty(settings->paths.directory_libretro)
|
||||
|| !frontend_driver_get_core_extension(core_ext,
|
||||
sizeof(core_ext))
|
||||
|
@ -5099,7 +5099,7 @@ void LoadCoreWindow::onLoadCustomCoreClicked()
|
||||
size_t _len;
|
||||
QString path;
|
||||
QByteArray pathArray;
|
||||
char core_ext[32];
|
||||
char core_ext[16];
|
||||
char filters[128];
|
||||
const char *pathData = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
Loading…
x
Reference in New Issue
Block a user