better handling of errors in flseek
This commit is contained in:
commit
ef0ff647fd
|
@ -157,6 +157,10 @@ ifeq ($(HAVE_LIBSICKSAXIS), 1)
|
||||||
CFLAGS += -DHAVE_LIBSICKSAXIS
|
CFLAGS += -DHAVE_LIBSICKSAXIS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(HAVE_LIBRETRODB), 1)
|
||||||
|
CFLAGS += -DHAVE_LIBRETRODB
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(HAVE_RPNG), 1)
|
ifeq ($(HAVE_RPNG), 1)
|
||||||
CFLAGS += -DWANT_RPNG
|
CFLAGS += -DWANT_RPNG
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -106,7 +106,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||||
|
|
||||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||||
|
|
||||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
|
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LIBRETRODB -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_7Z -DWANT_ZLIB -DSINC_LOWER_QUALITY -D__CELLOS_LV2__ -DHAVE_NETPLAY=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_BUILTIN_AUTOCONFIG
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
PPU_OPTIMIZE_LV := -O0 -g
|
PPU_OPTIMIZE_LV := -O0 -g
|
||||||
|
|
|
@ -128,7 +128,7 @@ static void salamander_init(char *s, size_t len)
|
||||||
if (!config_file_exists || !strcmp(s, ""))
|
if (!config_file_exists || !strcmp(s, ""))
|
||||||
find_and_set_first_file(s, len, EXT_EXECUTABLES);
|
find_and_set_first_file(s, len, EXT_EXECUTABLES);
|
||||||
else
|
else
|
||||||
RARCH_LOG("Start [%s] found in retroarch.cfg.\n", len);
|
RARCH_LOG("Start [%s] found in retroarch.cfg.\n", s);
|
||||||
|
|
||||||
if (!config_file_exists)
|
if (!config_file_exists)
|
||||||
{
|
{
|
||||||
|
@ -136,7 +136,7 @@ static void salamander_init(char *s, size_t len)
|
||||||
|
|
||||||
if (conf)
|
if (conf)
|
||||||
{
|
{
|
||||||
config_set_string(conf, "libretro_path", len);
|
config_set_string(conf, "libretro_path", s);
|
||||||
config_file_write(conf, g_defaults.config_path);
|
config_file_write(conf, g_defaults.config_path);
|
||||||
config_file_free(conf);
|
config_file_free(conf);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ static void* ps3_input_init(void)
|
||||||
ps3->joypad = input_joypad_init_driver(settings->input.joypad_driver, ps3);
|
ps3->joypad = input_joypad_init_driver(settings->input.joypad_driver, ps3);
|
||||||
|
|
||||||
if (ps3->joypad)
|
if (ps3->joypad)
|
||||||
ps3->joypad->init();
|
ps3->joypad->init(ps3);
|
||||||
|
|
||||||
#ifdef HAVE_MOUSE
|
#ifdef HAVE_MOUSE
|
||||||
cellMouseInit(MAX_MICE);
|
cellMouseInit(MAX_MICE);
|
||||||
|
|
|
@ -185,7 +185,8 @@ static struct buffer parse_argument(struct buffer buff, struct argument *arg,
|
||||||
static struct rmsgpack_dom_value is_true(struct rmsgpack_dom_value input,
|
static struct rmsgpack_dom_value is_true(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument *argv)
|
unsigned argc, const struct argument *argv)
|
||||||
{
|
{
|
||||||
struct rmsgpack_dom_value res = {0};
|
struct rmsgpack_dom_value res;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
res.bool_ = 0;
|
res.bool_ = 0;
|
||||||
|
@ -202,7 +203,8 @@ static struct rmsgpack_dom_value equals(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument * argv)
|
unsigned argc, const struct argument * argv)
|
||||||
{
|
{
|
||||||
struct argument arg;
|
struct argument arg;
|
||||||
struct rmsgpack_dom_value res = {0};
|
struct rmsgpack_dom_value res;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
|
|
||||||
|
@ -231,7 +233,8 @@ static struct rmsgpack_dom_value operator_or(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument * argv)
|
unsigned argc, const struct argument * argv)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
struct rmsgpack_dom_value res = {0};
|
struct rmsgpack_dom_value res;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
res.bool_ = 0;
|
res.bool_ = 0;
|
||||||
|
@ -258,8 +261,9 @@ static struct rmsgpack_dom_value operator_or(struct rmsgpack_dom_value input,
|
||||||
static struct rmsgpack_dom_value between(struct rmsgpack_dom_value input,
|
static struct rmsgpack_dom_value between(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument * argv)
|
unsigned argc, const struct argument * argv)
|
||||||
{
|
{
|
||||||
struct rmsgpack_dom_value res = {0};
|
struct rmsgpack_dom_value res;
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
res.bool_ = 0;
|
res.bool_ = 0;
|
||||||
|
@ -292,7 +296,8 @@ static struct rmsgpack_dom_value operator_and(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument * argv)
|
unsigned argc, const struct argument * argv)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
struct rmsgpack_dom_value res = {0};
|
struct rmsgpack_dom_value res;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
res.bool_ = 0;
|
res.bool_ = 0;
|
||||||
|
@ -320,8 +325,9 @@ static struct rmsgpack_dom_value operator_and(struct rmsgpack_dom_value input,
|
||||||
static struct rmsgpack_dom_value q_glob(struct rmsgpack_dom_value input,
|
static struct rmsgpack_dom_value q_glob(struct rmsgpack_dom_value input,
|
||||||
unsigned argc, const struct argument * argv)
|
unsigned argc, const struct argument * argv)
|
||||||
{
|
{
|
||||||
|
struct rmsgpack_dom_value res;
|
||||||
unsigned i = 0;
|
unsigned i = 0;
|
||||||
struct rmsgpack_dom_value res = {0};
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
res.bool_ = 0;
|
res.bool_ = 0;
|
||||||
|
@ -347,9 +353,10 @@ static struct rmsgpack_dom_value all_map(struct rmsgpack_dom_value input,
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
struct argument arg;
|
struct argument arg;
|
||||||
|
struct rmsgpack_dom_value res;
|
||||||
struct rmsgpack_dom_value nil_value;
|
struct rmsgpack_dom_value nil_value;
|
||||||
struct rmsgpack_dom_value res = {0};
|
|
||||||
struct rmsgpack_dom_value *value = NULL;
|
struct rmsgpack_dom_value *value = NULL;
|
||||||
|
memset(&res, 0, sizeof(res));
|
||||||
|
|
||||||
nil_value.type = RDT_NULL;
|
nil_value.type = RDT_NULL;
|
||||||
res.type = RDT_BOOL;
|
res.type = RDT_BOOL;
|
||||||
|
@ -700,7 +707,7 @@ static struct buffer parse_table(struct buffer buff,
|
||||||
unsigned i;
|
unsigned i;
|
||||||
const char *ident_name;
|
const char *ident_name;
|
||||||
size_t ident_len;
|
size_t ident_len;
|
||||||
struct argument args[MAX_ARGS] = {{0}};
|
struct argument args[MAX_ARGS];
|
||||||
unsigned argi = 0;
|
unsigned argi = 0;
|
||||||
|
|
||||||
buff = chomp(buff);
|
buff = chomp(buff);
|
||||||
|
|
|
@ -130,62 +130,6 @@ int cb_core_updater_download(void *data, size_t len)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int menu_entries_common_is_settings_entry(const char *label)
|
|
||||||
{
|
|
||||||
uint32_t hash = djb2_calculate(label);
|
|
||||||
|
|
||||||
switch (hash)
|
|
||||||
{
|
|
||||||
case MENU_LABEL_DRIVER_SETTINGS:
|
|
||||||
case MENU_LABEL_CORE_SETTINGS:
|
|
||||||
case MENU_LABEL_CONFIGURATION_SETTINGS:
|
|
||||||
case MENU_LABEL_LOGGING_SETTINGS:
|
|
||||||
case MENU_LABEL_SAVING_SETTINGS:
|
|
||||||
case MENU_LABEL_REWIND_SETTINGS:
|
|
||||||
case MENU_LABEL_VIDEO_SETTINGS:
|
|
||||||
case MENU_LABEL_RECORDING_SETTINGS:
|
|
||||||
case MENU_LABEL_FRAME_THROTTLE_SETTINGS:
|
|
||||||
case MENU_LABEL_SHADER_SETTINGS:
|
|
||||||
case MENU_LABEL_ONSCREEN_DISPLAY_SETTINGS:
|
|
||||||
case MENU_LABEL_AUDIO_SETTINGS:
|
|
||||||
case MENU_LABEL_INPUT_SETTINGS:
|
|
||||||
case MENU_LABEL_INPUT_USER_1_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_2_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_3_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_4_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_5_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_6_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_7_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_8_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_9_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_10_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_11_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_12_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_13_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_14_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_15_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_USER_16_BINDS:
|
|
||||||
case MENU_LABEL_INPUT_HOTKEY_SETTINGS:
|
|
||||||
case MENU_LABEL_OVERLAY_SETTINGS:
|
|
||||||
case MENU_LABEL_ONSCREEN_KEYBOARD_OVERLAY_SETTINGS:
|
|
||||||
case MENU_LABEL_MENU_SETTINGS:
|
|
||||||
case MENU_LABEL_UI_SETTINGS:
|
|
||||||
case MENU_LABEL_PATCH_SETTINGS:
|
|
||||||
case MENU_LABEL_PLAYLIST_SETTINGS:
|
|
||||||
case MENU_LABEL_CORE_UPDATER_SETTINGS:
|
|
||||||
case MENU_LABEL_NETWORK_SETTINGS:
|
|
||||||
case MENU_LABEL_ARCHIVE_SETTINGS:
|
|
||||||
case MENU_LABEL_USER_SETTINGS:
|
|
||||||
case MENU_LABEL_DIRECTORY_SETTINGS:
|
|
||||||
case MENU_LABEL_PRIVACY_SETTINGS:
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define DEBUG_LOG
|
#define DEBUG_LOG
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -45,8 +45,6 @@ int action_right_cheat(unsigned type, const char *label,
|
||||||
|
|
||||||
void menu_entries_common_load_content(bool persist);
|
void menu_entries_common_load_content(bool persist);
|
||||||
|
|
||||||
int menu_entries_common_is_settings_entry(const char *label);
|
|
||||||
|
|
||||||
int menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
int menu_entries_cbs_init_bind_left(menu_file_list_cbs_t *cbs,
|
||||||
const char *path, const char *label, unsigned type, size_t idx,
|
const char *path, const char *label, unsigned type, size_t idx,
|
||||||
const char *elem0, const char *elem1, const char *menu_label,
|
const char *elem0, const char *elem1, const char *menu_label,
|
||||||
|
|
|
@ -460,19 +460,6 @@ static int menu_entries_cbs_init_bind_deferred_push_compare_label(menu_file_list
|
||||||
{
|
{
|
||||||
if (strstr(label, "deferred_rdb_entry_detail"))
|
if (strstr(label, "deferred_rdb_entry_detail"))
|
||||||
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
cbs->action_deferred_push = deferred_push_rdb_entry_detail;
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int menu_entries_cbs_init_bind_deferred_push_compare_type(menu_file_list_cbs_t *cbs, unsigned type,
|
|
||||||
uint32_t label_hash)
|
|
||||||
{
|
|
||||||
if (type == MENU_SETTING_GROUP)
|
|
||||||
cbs->action_deferred_push = deferred_push_category;
|
|
||||||
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
|
||||||
cbs->action_deferred_push = deferred_push_rdb_collection;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
switch (label_hash)
|
switch (label_hash)
|
||||||
|
@ -631,21 +618,35 @@ static int menu_entries_cbs_init_bind_deferred_push_compare_type(menu_file_list_
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int menu_entries_cbs_init_bind_deferred_push_compare_type(menu_file_list_cbs_t *cbs, unsigned type,
|
||||||
|
uint32_t label_hash)
|
||||||
|
{
|
||||||
|
if (type == MENU_SETTING_GROUP)
|
||||||
|
cbs->action_deferred_push = deferred_push_category;
|
||||||
|
else if (type == MENU_FILE_PLAYLIST_COLLECTION)
|
||||||
|
cbs->action_deferred_push = deferred_push_rdb_collection;
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
int menu_entries_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||||
const char *path, const char *label, unsigned type, size_t idx,
|
const char *path, const char *label, unsigned type, size_t idx,
|
||||||
const char *elem0, const char *elem1,
|
const char *elem0, const char *elem1,
|
||||||
uint32_t label_hash, uint32_t menu_label_hash)
|
uint32_t label_hash, uint32_t menu_label_hash)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
|
rarch_setting_t *setting = menu_setting_find(elem0);
|
||||||
|
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
cbs->action_deferred_push = deferred_push_default;
|
cbs->action_deferred_push = deferred_push_default;
|
||||||
|
|
||||||
if ((strlen(elem1) != 0) && !!strcmp(elem0, elem1))
|
if (setting)
|
||||||
{
|
{
|
||||||
if (menu_entries_common_is_settings_entry(elem0))
|
if (!strcmp(setting->parent_group, "Main Menu") && setting->type == ST_GROUP)
|
||||||
{
|
{
|
||||||
if (!settings->menu.collapse_subgroups_enable)
|
if (!settings->menu.collapse_subgroups_enable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -347,10 +347,11 @@ static int menu_entries_cbs_init_bind_left_compare_label(menu_file_list_cbs_t *c
|
||||||
const char *label, uint32_t label_hash, const char *elem0)
|
const char *label, uint32_t label_hash, const char *elem0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
rarch_setting_t *setting = menu_setting_find(label);
|
||||||
|
|
||||||
if (label)
|
if (setting)
|
||||||
{
|
{
|
||||||
if (menu_entries_common_is_settings_entry(elem0))
|
if (!strcmp(setting->parent_group, "Main Menu") && setting->type == ST_GROUP)
|
||||||
{
|
{
|
||||||
cbs->action_left = action_left_scroll;
|
cbs->action_left = action_left_scroll;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -447,6 +448,7 @@ static int menu_entries_cbs_init_bind_left_compare_type(menu_file_list_cbs_t *cb
|
||||||
case MENU_FILE_DOWNLOAD_CORE:
|
case MENU_FILE_DOWNLOAD_CORE:
|
||||||
case MENU_FILE_CHEAT:
|
case MENU_FILE_CHEAT:
|
||||||
case MENU_FILE_REMAP:
|
case MENU_FILE_REMAP:
|
||||||
|
case MENU_FILE_PLAYLIST_COLLECTION:
|
||||||
case MENU_SETTING_GROUP:
|
case MENU_SETTING_GROUP:
|
||||||
switch (menu_label_hash)
|
switch (menu_label_hash)
|
||||||
{
|
{
|
||||||
|
|
|
@ -392,6 +392,7 @@ static int menu_entries_cbs_init_bind_right_compare_type(menu_file_list_cbs_t *c
|
||||||
case MENU_FILE_DOWNLOAD_CORE:
|
case MENU_FILE_DOWNLOAD_CORE:
|
||||||
case MENU_FILE_CHEAT:
|
case MENU_FILE_CHEAT:
|
||||||
case MENU_FILE_REMAP:
|
case MENU_FILE_REMAP:
|
||||||
|
case MENU_FILE_PLAYLIST_COLLECTION:
|
||||||
case MENU_SETTING_GROUP:
|
case MENU_SETTING_GROUP:
|
||||||
switch (menu_label_hash)
|
switch (menu_label_hash)
|
||||||
{
|
{
|
||||||
|
@ -419,10 +420,11 @@ static int menu_entries_cbs_init_bind_right_compare_label(menu_file_list_cbs_t *
|
||||||
const char *label, uint32_t label_hash, uint32_t menu_label_hash, const char *elem0)
|
const char *label, uint32_t label_hash, uint32_t menu_label_hash, const char *elem0)
|
||||||
{
|
{
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
rarch_setting_t *setting = menu_setting_find(label);
|
||||||
|
|
||||||
if (label)
|
if (setting)
|
||||||
{
|
{
|
||||||
if (menu_entries_common_is_settings_entry(elem0))
|
if (!strcmp(setting->parent_group, "Settings") && setting->type == ST_GROUP)
|
||||||
{
|
{
|
||||||
cbs->action_right = action_right_scroll;
|
cbs->action_right = action_right_scroll;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -45,6 +45,8 @@ static int action_get_title_default(const char *path, const char *label,
|
||||||
char elem0_path[PATH_MAX_LENGTH], elem1_path[PATH_MAX_LENGTH];
|
char elem0_path[PATH_MAX_LENGTH], elem1_path[PATH_MAX_LENGTH];
|
||||||
struct string_list *list_label = string_split(label, "|");
|
struct string_list *list_label = string_split(label, "|");
|
||||||
struct string_list *list_path = string_split(path, "|");
|
struct string_list *list_path = string_split(path, "|");
|
||||||
|
driver_t *driver = driver_get_ptr();
|
||||||
|
rarch_setting_t *setting = NULL;
|
||||||
|
|
||||||
*elem0 = *elem1 = *elem0_path = *elem1_path = 0;
|
*elem0 = *elem1 = *elem0_path = *elem1_path = 0;
|
||||||
|
|
||||||
|
@ -70,22 +72,27 @@ static int action_get_title_default(const char *path, const char *label,
|
||||||
string_list_free(list_path);
|
string_list_free(list_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hash = djb2_calculate(label);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
RARCH_LOG("label %s, elem0 %s, elem1 %s\n", label, elem0, elem1);
|
RARCH_LOG("label %s, elem0 %s, elem1 %s\n", label, elem0, elem1);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (menu_entries_common_is_settings_entry(label) == 1)
|
setting = menu_setting_find(label);
|
||||||
|
|
||||||
|
if (setting)
|
||||||
{
|
{
|
||||||
strlcpy(s, string_to_upper(elem0), len);
|
if (!strcmp(setting->parent_group, "Main Menu") && setting->type == ST_GROUP)
|
||||||
if (elem1[0] != '\0')
|
|
||||||
{
|
{
|
||||||
strlcat(s, " - ", len);
|
strlcpy(s, string_to_upper(elem0), len);
|
||||||
strlcat(s, string_to_upper(elem1), len);
|
if (elem1[0] != '\0')
|
||||||
|
{
|
||||||
|
strlcat(s, " - ", len);
|
||||||
|
strlcat(s, string_to_upper(elem1), len);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hash = djb2_calculate(label);
|
|
||||||
|
|
||||||
switch (hash)
|
switch (hash)
|
||||||
{
|
{
|
||||||
|
@ -283,36 +290,36 @@ static int action_get_title_default(const char *path, const char *label,
|
||||||
snprintf(s, len, "AUTOCONFIG DIR %s", path);
|
snprintf(s, len, "AUTOCONFIG DIR %s", path);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (menu_type == MENU_SETTINGS_CUSTOM_VIEWPORT ||
|
switch (menu_type)
|
||||||
menu_type == MENU_SETTINGS)
|
|
||||||
snprintf(s, len, "MENU %s", path);
|
|
||||||
else if (menu_type == MENU_SETTINGS_CUSTOM_BIND ||
|
|
||||||
menu_type == MENU_SETTINGS_CUSTOM_BIND_KEYBOARD)
|
|
||||||
{
|
{
|
||||||
strlcpy(s, "INPUT SETTINGS", len);
|
case MENU_SETTINGS_CUSTOM_VIEWPORT:
|
||||||
if (elem1[0] != '\0')
|
case MENU_SETTINGS:
|
||||||
{
|
snprintf(s, len, "MENU %s", path);
|
||||||
strlcat(s, " - ", len);
|
break;
|
||||||
strlcat(s, string_to_upper(elem1), len);
|
case MENU_SETTINGS_CUSTOM_BIND:
|
||||||
}
|
case MENU_SETTINGS_CUSTOM_BIND_KEYBOARD:
|
||||||
}
|
strlcpy(s, "INPUT SETTINGS", len);
|
||||||
else
|
if (elem1[0] != '\0')
|
||||||
{
|
{
|
||||||
driver_t *driver = driver_get_ptr();
|
strlcat(s, " - ", len);
|
||||||
|
strlcat(s, string_to_upper(elem1), len);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (driver->menu->defer_core)
|
||||||
|
snprintf(s, len, "CONTENT %s", path);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
global_t *global = global_get_ptr();
|
||||||
|
const char *core_name = global->menu.info.library_name;
|
||||||
|
|
||||||
if (driver->menu->defer_core)
|
if (!core_name)
|
||||||
snprintf(s, len, "CONTENT %s", path);
|
core_name = global->system.info.library_name;
|
||||||
else
|
if (!core_name)
|
||||||
{
|
core_name = "No Core";
|
||||||
global_t *global = global_get_ptr();
|
snprintf(s, len, "CONTENT (%s) %s", core_name, path);
|
||||||
const char *core_name = global->menu.info.library_name;
|
}
|
||||||
|
break;
|
||||||
if (!core_name)
|
|
||||||
core_name = global->system.info.library_name;
|
|
||||||
if (!core_name)
|
|
||||||
core_name = "No Core";
|
|
||||||
snprintf(s, len, "CONTENT (%s) %s", core_name, path);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -135,6 +135,7 @@ typedef struct rarch_setting
|
||||||
const char *short_description;
|
const char *short_description;
|
||||||
const char *group;
|
const char *group;
|
||||||
const char *subgroup;
|
const char *subgroup;
|
||||||
|
const char *parent_group;
|
||||||
const char *values;
|
const char *values;
|
||||||
|
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
|
|
Loading…
Reference in New Issue