mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 21:32:45 +00:00
(Ozone/XMB) Optimize some string_is_equal comparisons
This commit is contained in:
parent
58b22b0a6e
commit
5db62e73da
@ -100,9 +100,14 @@ static void ozone_draw_entry_value(
|
||||
else
|
||||
{
|
||||
if (!string_is_empty(entry->value))
|
||||
{
|
||||
if (string_is_equal(entry->value, "..."))
|
||||
return;
|
||||
if (string_starts_with(entry->value, "(") &&
|
||||
string_ends_with (entry->value, ")")
|
||||
)
|
||||
{
|
||||
if (
|
||||
string_is_equal(entry->value, "...") ||
|
||||
string_is_equal(entry->value, "(PRESET)") ||
|
||||
string_is_equal(entry->value, "(SHADER)") ||
|
||||
string_is_equal(entry->value, "(COMP)") ||
|
||||
@ -116,13 +121,10 @@ static void ozone_draw_entry_value(
|
||||
string_is_equal(entry->value, "(FILE)") ||
|
||||
string_is_equal(entry->value, "(IMAGE)")
|
||||
)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
do_draw_text = true;
|
||||
}
|
||||
else
|
||||
|
||||
do_draw_text = true;
|
||||
}
|
||||
|
||||
|
@ -3081,9 +3081,16 @@ static int xmb_draw_item(
|
||||
else
|
||||
{
|
||||
if (!string_is_empty(entry.value))
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
if (string_is_equal(entry.value, "..."))
|
||||
found = true;
|
||||
else if (string_starts_with(entry.value, "(") &&
|
||||
string_ends_with (entry.value, ")")
|
||||
)
|
||||
{
|
||||
if (
|
||||
string_is_equal(entry.value, "...") ||
|
||||
string_is_equal(entry.value, "(PRESET)") ||
|
||||
string_is_equal(entry.value, "(SHADER)") ||
|
||||
string_is_equal(entry.value, "(COMP)") ||
|
||||
@ -3097,9 +3104,10 @@ static int xmb_draw_item(
|
||||
string_is_equal(entry.value, "(FILE)") ||
|
||||
string_is_equal(entry.value, "(IMAGE)")
|
||||
)
|
||||
{
|
||||
found = true;
|
||||
}
|
||||
else
|
||||
|
||||
if (!found)
|
||||
do_draw_text = true;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user