mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 08:37:41 +00:00
Reduce local string sizes
This commit is contained in:
parent
9c71620c53
commit
1450cc04de
@ -5148,7 +5148,6 @@ static unsigned menu_displaylist_parse_content_information(
|
|||||||
&& !string_is_empty(db_name))
|
&& !string_is_empty(db_name))
|
||||||
{
|
{
|
||||||
char db_path[PATH_MAX_LENGTH];
|
char db_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
fill_pathname_join_special(db_path,
|
fill_pathname_join_special(db_path,
|
||||||
settings->paths.path_content_database,
|
settings->paths.path_content_database,
|
||||||
db_name,
|
db_name,
|
||||||
@ -6688,7 +6687,7 @@ static unsigned menu_displaylist_populate_subsystem(
|
|||||||
{
|
{
|
||||||
_len2 += strlcpy(rom_buff + _len2,
|
_len2 += strlcpy(rom_buff + _len2,
|
||||||
path_basename(content_get_subsystem_rom(j)),
|
path_basename(content_get_subsystem_rom(j)),
|
||||||
sizeof(rom_buff) - _len2);
|
sizeof(rom_buff) - _len2);
|
||||||
if (j != content_get_subsystem_rom_id() - 1)
|
if (j != content_get_subsystem_rom_id() - 1)
|
||||||
_len2 += strlcpy(rom_buff + _len2, "|", sizeof(rom_buff) - _len2);
|
_len2 += strlcpy(rom_buff + _len2, "|", sizeof(rom_buff) - _len2);
|
||||||
}
|
}
|
||||||
@ -12835,7 +12834,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
{
|
{
|
||||||
size_t _len;
|
size_t _len;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
char text[PATH_MAX_LENGTH];
|
char text[128];
|
||||||
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
|
const size_t profiles_count = sizeof(SWITCH_CPU_PROFILES)/sizeof(SWITCH_CPU_PROFILES[1]);
|
||||||
/* TODO/FIXME - localize */
|
/* TODO/FIXME - localize */
|
||||||
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
|
runloop_msg_queue_push("Warning : extended overclocking can damage the Switch",
|
||||||
@ -15188,7 +15187,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
menu_entries_clear(info->list);
|
menu_entries_clear(info->list);
|
||||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||||
{
|
{
|
||||||
char new_exts[PATH_MAX_LENGTH];
|
char new_exts[128];
|
||||||
gfx_ctx_flags_t flags;
|
gfx_ctx_flags_t flags;
|
||||||
size_t _len = 0;
|
size_t _len = 0;
|
||||||
new_exts[0] = '\0';
|
new_exts[0] = '\0';
|
||||||
@ -15251,7 +15250,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||||
{
|
{
|
||||||
gfx_ctx_flags_t flags;
|
gfx_ctx_flags_t flags;
|
||||||
char new_exts[PATH_MAX_LENGTH];
|
char new_exts[128];
|
||||||
size_t _len = 0;
|
size_t _len = 0;
|
||||||
|
|
||||||
flags.flags = 0;
|
flags.flags = 0;
|
||||||
@ -15291,7 +15290,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
info->type_default = FILE_TYPE_IMAGE;
|
info->type_default = FILE_TYPE_IMAGE;
|
||||||
{
|
{
|
||||||
size_t _len = 0;
|
size_t _len = 0;
|
||||||
char new_exts[PATH_MAX_LENGTH];
|
char new_exts[128];
|
||||||
new_exts[0] = '\0';
|
new_exts[0] = '\0';
|
||||||
#ifdef HAVE_RBMP
|
#ifdef HAVE_RBMP
|
||||||
_len += strlcpy(new_exts + _len, "bmp", sizeof(new_exts) - _len);
|
_len += strlcpy(new_exts + _len, "bmp", sizeof(new_exts) - _len);
|
||||||
|
19
verbosity.c
19
verbosity.c
@ -460,7 +460,6 @@ void rarch_log_file_init(
|
|||||||
static char timestamped_log_file_name[64] = {0};
|
static char timestamped_log_file_name[64] = {0};
|
||||||
bool logging_to_file = g_verbosity->initialized;
|
bool logging_to_file = g_verbosity->initialized;
|
||||||
|
|
||||||
|
|
||||||
/* If this is the first run, generate a timestamped log
|
/* If this is the first run, generate a timestamped log
|
||||||
* file name (do this even when not outputting timestamped
|
* file name (do this even when not outputting timestamped
|
||||||
* log files, since user may decide to switch at any moment...) */
|
* log files, since user may decide to switch at any moment...) */
|
||||||
@ -538,18 +537,14 @@ void rarch_log_file_init(
|
|||||||
if (!string_is_empty(log_file_path))
|
if (!string_is_empty(log_file_path))
|
||||||
{
|
{
|
||||||
/* Create log directory, if required */
|
/* Create log directory, if required */
|
||||||
if (!string_is_empty(log_directory))
|
if ( !string_is_empty(log_directory)
|
||||||
|
&& !path_is_directory(log_directory)
|
||||||
|
&& !path_mkdir(log_directory))
|
||||||
{
|
{
|
||||||
if (!path_is_directory(log_directory))
|
/* Re-enable console logging and output error message */
|
||||||
{
|
retro_main_log_file_init(NULL, false);
|
||||||
if (!path_mkdir(log_directory))
|
RARCH_ERR("Failed to create system event log directory: %s\n", log_directory);
|
||||||
{
|
return;
|
||||||
/* Re-enable console logging and output error message */
|
|
||||||
retro_main_log_file_init(NULL, false);
|
|
||||||
RARCH_ERR("Failed to create system event log directory: %s\n", log_directory);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When RetroArch is launched, log file is overwritten.
|
/* When RetroArch is launched, log file is overwritten.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user