Skip to content

Commit

Permalink
on/off labels no longer cached - language switches now immediately
Browse files Browse the repository at this point in the history
change the on/off labels as well - and binary size is smaller
  • Loading branch information
LibretroAdmin committed Feb 11, 2025
1 parent 653c6ed commit 76233f8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
8 changes: 2 additions & 6 deletions menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,8 +1234,8 @@ static void setting_get_string_representation_st_bool(rarch_setting_t *setting,
{
if (setting)
strlcpy(s, *setting->value.target.boolean
? setting->boolean.on_label
: setting->boolean.off_label,
? msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)
: msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF),
len);
}

Expand Down Expand Up @@ -2062,8 +2062,6 @@ static rarch_setting_t setting_bool_setting(const char* name,
result.value.target.boolean = target;
result.original_value.boolean = *target;
result.default_value.boolean = default_value;
result.boolean.off_label = off;
result.boolean.on_label = on;

result.cmd_trigger_idx = CMD_EVENT_NONE;

Expand Down Expand Up @@ -24705,8 +24703,6 @@ void menu_setting_free(rarch_setting_t *setting)
(*&list)[pos].original_value.fraction = 0.0f; \
(*&list)[pos].dir.empty_path = NULL; \
(*&list)[pos].cmd_trigger_idx = CMD_EVENT_NONE; \
(*&list)[pos].boolean.off_label = NULL; \
(*&list)[pos].boolean.on_label = NULL; \
}

static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_info)
Expand Down
5 changes: 0 additions & 5 deletions setting_list.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,6 @@ struct rarch_setting
float min;
float max;
struct
{
const char *off_label;
const char *on_label;
} boolean;
struct
{
const char *empty_path;
} dir;
Expand Down

0 comments on commit 76233f8

Please sign in to comment.