mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
Reduce size of char variables
This commit is contained in:
parent
60d313bf6a
commit
c1b59df7ae
@ -210,7 +210,7 @@ typedef struct settings
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char driver[32];
|
char driver[32];
|
||||||
char device[PATH_MAX_LENGTH];
|
char device[255];
|
||||||
bool allow;
|
bool allow;
|
||||||
unsigned width;
|
unsigned width;
|
||||||
unsigned height;
|
unsigned height;
|
||||||
@ -234,7 +234,7 @@ typedef struct settings
|
|||||||
{
|
{
|
||||||
char driver[32];
|
char driver[32];
|
||||||
char resampler[32];
|
char resampler[32];
|
||||||
char device[PATH_MAX_LENGTH];
|
char device[255];
|
||||||
bool enable;
|
bool enable;
|
||||||
bool mute_enable;
|
bool mute_enable;
|
||||||
unsigned out_rate;
|
unsigned out_rate;
|
||||||
@ -400,7 +400,7 @@ typedef struct settings
|
|||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
char server[PATH_MAX_LENGTH];
|
char server[255];
|
||||||
unsigned port;
|
unsigned port;
|
||||||
unsigned sync_frames;
|
unsigned sync_frames;
|
||||||
unsigned check_frames;
|
unsigned check_frames;
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
#include <file/archive_file.h>
|
#include <file/archive_file.h>
|
||||||
#include <retro_miscellaneous.h>
|
|
||||||
#include <retro_common_api.h>
|
#include <retro_common_api.h>
|
||||||
|
|
||||||
RETRO_BEGIN_DECLS
|
RETRO_BEGIN_DECLS
|
||||||
@ -107,7 +106,7 @@ typedef struct database_state_handle
|
|||||||
uint32_t crc;
|
uint32_t crc;
|
||||||
uint32_t archive_crc;
|
uint32_t archive_crc;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
char archive_name[PATH_MAX_LENGTH];
|
char archive_name[255];
|
||||||
char serial[4096];
|
char serial[4096];
|
||||||
} database_state_handle_t;
|
} database_state_handle_t;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ static bool input_config_autoconfigure_joypad_init(autoconfig_params_t *params)
|
|||||||
|
|
||||||
bool input_config_autoconfigure_joypad(autoconfig_params_t *params)
|
bool input_config_autoconfigure_joypad(autoconfig_params_t *params)
|
||||||
{
|
{
|
||||||
char msg[PATH_MAX_LENGTH];
|
char msg[255];
|
||||||
|
|
||||||
msg[0] = '\0';
|
msg[0] = '\0';
|
||||||
|
|
||||||
@ -337,7 +337,7 @@ const struct retro_keybind *input_get_auto_bind(unsigned port, unsigned id)
|
|||||||
|
|
||||||
void input_config_autoconfigure_disconnect(unsigned i, const char *ident)
|
void input_config_autoconfigure_disconnect(unsigned i, const char *ident)
|
||||||
{
|
{
|
||||||
char msg[PATH_MAX_LENGTH];
|
char msg[255];
|
||||||
|
|
||||||
msg[0] = '\0';
|
msg[0] = '\0';
|
||||||
|
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
#include <lists/string_list.h>
|
#include <lists/string_list.h>
|
||||||
#include <retro_assert.h>
|
#include <retro_assert.h>
|
||||||
#include <retro_miscellaneous.h>
|
|
||||||
#include <compat/strl.h>
|
#include <compat/strl.h>
|
||||||
#include <compat/posix_string.h>
|
#include <compat/posix_string.h>
|
||||||
|
|
||||||
@ -290,7 +289,7 @@ bool string_list_find_elem_prefix(const struct string_list *list,
|
|||||||
const char *prefix, const char *elem)
|
const char *prefix, const char *elem)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
char prefixed[PATH_MAX_LENGTH];
|
char prefixed[255];
|
||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
return false;
|
return false;
|
||||||
|
@ -447,7 +447,7 @@ static void menu_action_setting_disp_set_label_input_desc(
|
|||||||
const char *path,
|
const char *path,
|
||||||
char *s2, size_t len2)
|
char *s2, size_t len2)
|
||||||
{
|
{
|
||||||
char descriptor[PATH_MAX_LENGTH];
|
char descriptor[255];
|
||||||
const struct retro_keybind *auto_bind = NULL;
|
const struct retro_keybind *auto_bind = NULL;
|
||||||
const struct retro_keybind *keybind = NULL;
|
const struct retro_keybind *keybind = NULL;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
@ -461,6 +461,8 @@ static void menu_action_setting_disp_set_label_input_desc(
|
|||||||
|
|
||||||
if (!settings)
|
if (!settings)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
descriptor[0] = '\0';
|
||||||
|
|
||||||
remap_id = settings->input.remap_ids
|
remap_id = settings->input.remap_ids
|
||||||
[inp_desc_user][inp_desc_button_index_offset];
|
[inp_desc_user][inp_desc_button_index_offset];
|
||||||
@ -1405,7 +1407,7 @@ static void menu_action_setting_disp_set_label_playlist_associations(file_list_t
|
|||||||
const char *path,
|
const char *path,
|
||||||
char *s2, size_t len2)
|
char *s2, size_t len2)
|
||||||
{
|
{
|
||||||
char playlist_name_with_ext[PATH_MAX_LENGTH];
|
char playlist_name_with_ext[255];
|
||||||
bool found_matching_core_association = false;
|
bool found_matching_core_association = false;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
struct string_list *str_list = string_split(settings->playlist_names, ";");
|
struct string_list *str_list = string_split(settings->playlist_names, ";");
|
||||||
|
@ -37,7 +37,7 @@ static void replace_chars(char *str, char c1, char c2)
|
|||||||
|
|
||||||
static void sanitize_to_string(char *s, const char *label, size_t len)
|
static void sanitize_to_string(char *s, const char *label, size_t len)
|
||||||
{
|
{
|
||||||
char new_label[PATH_MAX_LENGTH];
|
char new_label[255];
|
||||||
|
|
||||||
new_label[0] = '\0';
|
new_label[0] = '\0';
|
||||||
|
|
||||||
@ -690,7 +690,7 @@ static int action_get_title_generic(char *s, size_t len, const char *path,
|
|||||||
|
|
||||||
if (list_path)
|
if (list_path)
|
||||||
{
|
{
|
||||||
char elem0_path[PATH_MAX_LENGTH];
|
char elem0_path[255];
|
||||||
|
|
||||||
elem0_path[0] = '\0';
|
elem0_path[0] = '\0';
|
||||||
|
|
||||||
@ -839,8 +839,8 @@ static int action_get_title_group_settings(const char *path, const char *label,
|
|||||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU), len);
|
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU), len);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char elem0[PATH_MAX_LENGTH];
|
char elem0[255];
|
||||||
char elem1[PATH_MAX_LENGTH];
|
char elem1[255];
|
||||||
struct string_list *list_label = string_split(label, "|");
|
struct string_list *list_label = string_split(label, "|");
|
||||||
|
|
||||||
elem0[0] = elem1[0] = '\0';
|
elem0[0] = elem1[0] = '\0';
|
||||||
|
@ -45,11 +45,11 @@ enum menu_entry_type
|
|||||||
|
|
||||||
typedef struct menu_entry
|
typedef struct menu_entry
|
||||||
{
|
{
|
||||||
char path[PATH_MAX_LENGTH];
|
char path[255];
|
||||||
char label[PATH_MAX_LENGTH];
|
char label[255];
|
||||||
char sublabel[PATH_MAX_LENGTH];
|
char sublabel[255];
|
||||||
char rich_label[PATH_MAX_LENGTH];
|
char rich_label[255];
|
||||||
char value[PATH_MAX_LENGTH];
|
char value[255];
|
||||||
size_t entry_idx;
|
size_t entry_idx;
|
||||||
enum msg_hash_enums enum_idx;
|
enum msg_hash_enums enum_idx;
|
||||||
unsigned idx;
|
unsigned idx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user