mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-26 12:47:37 +00:00
Cleanups
This commit is contained in:
parent
df6a7993b3
commit
bc5b1b9d60
@ -633,18 +633,22 @@ static void mui_render_label_value(mui_handle_t *mui,
|
|||||||
y + mui->line_height / 2 + label_offset,
|
y + mui->line_height / 2 + label_offset,
|
||||||
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
width, height, color, TEXT_ALIGN_LEFT, 1.0f, false, 0);
|
||||||
|
|
||||||
if (string_is_equal(value, "disabled") || string_is_equal(value, "off"))
|
if (string_is_equal(value, "disabled") ||
|
||||||
|
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
|
||||||
{
|
{
|
||||||
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF]) {
|
if (mui->textures.list[MUI_TEXTURE_SWITCH_OFF])
|
||||||
|
{
|
||||||
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_OFF];
|
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_OFF];
|
||||||
switch_is_on = false;
|
switch_is_on = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
do_draw_text = true;
|
do_draw_text = true;
|
||||||
}
|
}
|
||||||
else if (string_is_equal(value, "enabled") || string_is_equal(value, "on"))
|
else if (string_is_equal(value, "enabled") ||
|
||||||
|
(string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))))
|
||||||
{
|
{
|
||||||
if (mui->textures.list[MUI_TEXTURE_SWITCH_ON]) {
|
if (mui->textures.list[MUI_TEXTURE_SWITCH_ON])
|
||||||
|
{
|
||||||
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_ON];
|
texture_switch = mui->textures.list[MUI_TEXTURE_SWITCH_ON];
|
||||||
switch_is_on = true;
|
switch_is_on = true;
|
||||||
}
|
}
|
||||||
@ -655,11 +659,6 @@ static void mui_render_label_value(mui_handle_t *mui,
|
|||||||
{
|
{
|
||||||
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(value));
|
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(value));
|
||||||
|
|
||||||
if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
|
||||||
type = FILE_TYPE_BOOL_OFF;
|
|
||||||
else if (string_is_equal(value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
|
|
||||||
type = FILE_TYPE_BOOL_ON;
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case FILE_TYPE_COMPRESSED:
|
case FILE_TYPE_COMPRESSED:
|
||||||
|
@ -2012,7 +2012,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
|||||||
menu_entry_get_value(i, list, entry_value, sizeof(entry_value));
|
menu_entry_get_value(i, list, entry_value, sizeof(entry_value));
|
||||||
|
|
||||||
if (string_is_equal(entry_value, "disabled") ||
|
if (string_is_equal(entry_value, "disabled") ||
|
||||||
string_is_equal(entry_value, "off"))
|
(string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF))))
|
||||||
{
|
{
|
||||||
if (xmb->textures.list[XMB_TEXTURE_SWITCH_OFF])
|
if (xmb->textures.list[XMB_TEXTURE_SWITCH_OFF])
|
||||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_OFF];
|
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_OFF];
|
||||||
@ -2020,7 +2020,7 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
|||||||
do_draw_text = true;
|
do_draw_text = true;
|
||||||
}
|
}
|
||||||
else if (string_is_equal(entry_value, "enabled") ||
|
else if (string_is_equal(entry_value, "enabled") ||
|
||||||
string_is_equal(entry_value, "on"))
|
(string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON))))
|
||||||
{
|
{
|
||||||
if (xmb->textures.list[XMB_TEXTURE_SWITCH_ON])
|
if (xmb->textures.list[XMB_TEXTURE_SWITCH_ON])
|
||||||
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_ON];
|
texture_switch = xmb->textures.list[XMB_TEXTURE_SWITCH_ON];
|
||||||
@ -2031,11 +2031,6 @@ static void xmb_draw_items(xmb_handle_t *xmb,
|
|||||||
{
|
{
|
||||||
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(entry_value));
|
enum msg_file_type type = msg_hash_to_file_type(msg_hash_calculate(entry_value));
|
||||||
|
|
||||||
if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OFF)))
|
|
||||||
type = FILE_TYPE_BOOL_OFF;
|
|
||||||
else if (string_is_equal(entry_value, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ON)))
|
|
||||||
type = FILE_TYPE_BOOL_ON;
|
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case FILE_TYPE_COMPRESSED:
|
case FILE_TYPE_COMPRESSED:
|
||||||
|
Loading…
Reference in New Issue
Block a user