Move popping of RGUI list out of rgui.c rasterizer - should make

all of the RGUI list state code self-contained inside menu_common.h
This commit is contained in:
twinaphex 2013-11-04 16:37:51 +01:00
parent 6bc239abf7
commit 3d756537ac
2 changed files with 14 additions and 12 deletions

View File

@ -1468,7 +1468,20 @@ bool menu_iterate(void)
driver.video_poke->set_texture_enable(driver.video_data, false,
MENU_TEXTURE_FULLSCREEN);
if (rgui_input_postprocess(rgui, rgui->old_input_state) || input_entry_ret)
int ret = rgui_input_postprocess(rgui, rgui->old_input_state);
if (ret < 0)
{
unsigned type = 0;
rgui_list_get_last(rgui->menu_stack, NULL, &type);
while (type != RGUI_SETTINGS)
{
rgui_list_pop(rgui->menu_stack, &rgui->selection_ptr);
rgui_list_get_last(rgui->menu_stack, NULL, &type);
}
}
if (ret || input_entry_ret)
goto deinit;
return true;

View File

@ -565,17 +565,6 @@ int rgui_input_postprocess(void *data, uint64_t old_state)
ret = -1;
}
if (ret < 0)
{
unsigned type = 0;
rgui_list_get_last(rgui->menu_stack, NULL, &type);
while (type != RGUI_SETTINGS)
{
rgui_list_pop(rgui->menu_stack, &rgui->selection_ptr);
rgui_list_get_last(rgui->menu_stack, NULL, &type);
}
}
return ret;
}