mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-24 19:56:06 +00:00
(Lakka) Cleanups
This commit is contained in:
parent
19d3efe7f9
commit
f0c521c353
@ -591,8 +591,6 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
|
|
||||||
for(k = 0; k < item->num_subitems; k++)
|
for(k = 0; k < item->num_subitems; k++)
|
||||||
{
|
{
|
||||||
bool draw_subitem = false;
|
|
||||||
bool draw_subicon = false;
|
|
||||||
menu_subitem_t *subitem = (menu_subitem_t*)&item->subitems[k];
|
menu_subitem_t *subitem = (menu_subitem_t*)&item->subitems[k];
|
||||||
|
|
||||||
if (!subitem)
|
if (!subitem)
|
||||||
@ -619,12 +617,6 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
(g_extern.main_is_init &&
|
(g_extern.main_is_init &&
|
||||||
!g_extern.libretro_dummy &&
|
!g_extern.libretro_dummy &&
|
||||||
strcmp(g_extern.fullpath, &active_item->rom) == 0))
|
strcmp(g_extern.fullpath, &active_item->rom) == 0))
|
||||||
{
|
|
||||||
draw_subicon =true;
|
|
||||||
draw_subitem = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (draw_subicon)
|
|
||||||
{
|
{
|
||||||
lakka_draw_icon(subitem->icon,
|
lakka_draw_icon(subitem->icon,
|
||||||
156 + HSPACING*(i+2) + all_categories_x - dim/2.0,
|
156 + HSPACING*(i+2) + all_categories_x - dim/2.0,
|
||||||
@ -632,16 +624,13 @@ static void lakka_draw_subitems(int i, int j)
|
|||||||
subitem->alpha,
|
subitem->alpha,
|
||||||
0,
|
0,
|
||||||
subitem->zoom);
|
subitem->zoom);
|
||||||
}
|
|
||||||
|
|
||||||
if (draw_subitem)
|
|
||||||
{
|
|
||||||
lakka_draw_text(&subitem->out,
|
lakka_draw_text(&subitem->out,
|
||||||
156 + HSPACING * (i+2) + all_categories_x + dim/2.0,
|
156 + HSPACING * (i+2) + all_categories_x + dim/2.0,
|
||||||
300 + subitem->y + 15,
|
300 + subitem->y + 15,
|
||||||
1,
|
1,
|
||||||
subitem->alpha);
|
subitem->alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1029,6 +1018,8 @@ void lakka_init_settings(void)
|
|||||||
|
|
||||||
void lakka_settings_context_reset(void)
|
void lakka_settings_context_reset(void)
|
||||||
{
|
{
|
||||||
|
menu_item_t *item;
|
||||||
|
int k;
|
||||||
menu_category_t *category = (menu_category_t*)&categories[0];
|
menu_category_t *category = (menu_category_t*)&categories[0];
|
||||||
|
|
||||||
if (!category)
|
if (!category)
|
||||||
@ -1039,43 +1030,26 @@ void lakka_settings_context_reset(void)
|
|||||||
if (font_driver)
|
if (font_driver)
|
||||||
font_driver->render_msg(font, category->name, &category->out);
|
font_driver->render_msg(font, category->name, &category->out);
|
||||||
|
|
||||||
int j, k;
|
|
||||||
|
|
||||||
// General options item
|
// General options item
|
||||||
|
|
||||||
j = 0;
|
item = (menu_item_t*)&category->items[0];
|
||||||
menu_item_t *item0;
|
|
||||||
item0 = (menu_item_t*)&category->items[j];
|
|
||||||
if (font_driver)
|
if (font_driver)
|
||||||
font_driver->render_msg(font, item0->name, &item0->out);
|
font_driver->render_msg(font, item->name, &item->out);
|
||||||
|
|
||||||
// General options subitems
|
// General options subitems
|
||||||
|
for (k = 0; k < 2; k++)
|
||||||
k = 0;
|
{
|
||||||
menu_subitem_t *subitem0 = (menu_subitem_t*)&item0->subitems[k];
|
menu_subitem_t *subitem = (menu_subitem_t*)&item->subitems[k];
|
||||||
subitem0->icon = subsetting_icon;
|
subitem->icon = subsetting_icon;
|
||||||
if (font_driver)
|
if (font_driver)
|
||||||
font_driver->render_msg(font, subitem0->name, &subitem0->out);
|
font_driver->render_msg(font, subitem->name, &subitem->out);
|
||||||
|
}
|
||||||
k = 1;
|
|
||||||
menu_subitem_t *subitem1 = (menu_subitem_t*)&item0->subitems[k];
|
|
||||||
subitem1->icon = subsetting_icon;
|
|
||||||
if (font_driver)
|
|
||||||
font_driver->render_msg(font, subitem1->name, &subitem1->out);
|
|
||||||
|
|
||||||
k = 2;
|
|
||||||
menu_subitem_t *subitem2 = (menu_subitem_t*)&item0->subitems[k];
|
|
||||||
subitem2->icon = subsetting_icon;
|
|
||||||
if (font_driver)
|
|
||||||
font_driver->render_msg(font, subitem2->name, &subitem2->out);
|
|
||||||
|
|
||||||
// Quit item
|
// Quit item
|
||||||
|
|
||||||
j = 1;
|
item = (menu_item_t*)&category->items[1];
|
||||||
menu_item_t *item1;
|
|
||||||
item1 = (menu_item_t*)&category->items[j];
|
|
||||||
if (font_driver)
|
if (font_driver)
|
||||||
font_driver->render_msg(font, item1->name, &item1->out);
|
font_driver->render_msg(font, item->name, &item->out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user