Menu improvements (#5288)

* (menu_animation) Stop KILL_BY_SUBJECT asap

* (xmb) Don't query mouse/pointer state so many times per frame
This commit is contained in:
Higor Eurípedes 2017-08-12 17:53:56 -03:00 committed by Twinaphex
parent 2f9ad9c3fa
commit 9f760af6c6
2 changed files with 5 additions and 5 deletions

View File

@ -2435,16 +2435,16 @@ static void xmb_render(void *data, bool is_idle)
if (pointer_enable || mouse_enable)
{
size_t selection = menu_navigation_get_selection();
size_t selection = menu_navigation_get_selection();
int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS);
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS)
+ (xmb->cursor.size/2);
for (i = 0; i < end; i++)
{
float item_y1 = xmb->margins.screen.top
+ xmb_item_y(xmb, (int)i, selection);
float item_y2 = item_y1 + xmb->icon.size;
int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS);
int16_t mouse_y = menu_input_mouse_state(MENU_MOUSE_Y_AXIS)
+ (xmb->cursor.size/2);
if (pointer_enable)
{

View File

@ -673,7 +673,7 @@ bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data)
(menu_animation_ctx_subject_t*)data;
float **sub = (float**)subject->data;
for (i = 0; i < anim.size; ++i)
for (i = 0; i < anim.size && killed < subject->count; ++i)
{
if (!anim.list[i].alive)
continue;