Merge pull request #1955 from libretro/revert-1953-master

Revert "(GLUI) Fix scrolling"
This commit is contained in:
Twinaphex 2015-07-13 20:05:31 +02:00
commit d6d6f080c7

View File

@ -653,7 +653,7 @@ static bool glui_load_image(void *data, menu_image_type_t type)
static float glui_get_scroll(void)
{
int half = 0;
unsigned height;
unsigned width, height;
glui_handle_t *glui = NULL;
menu_handle_t *menu = menu_driver_get_ptr();
menu_navigation_t *nav = menu_navigation_get_ptr();
@ -661,7 +661,7 @@ static float glui_get_scroll(void)
if (!menu || !menu->userdata)
return 0;
video_driver_get_size(NULL, &height);
video_driver_get_size(&width, &height);
glui = (glui_handle_t*)menu->userdata;
if (glui->line_height)
@ -678,7 +678,7 @@ static void glui_navigation_set(bool scroll)
menu_handle_t *menu = menu_driver_get_ptr();
float scroll_pos = 0;
if (!menu || !disp)
if (!menu || !disp || !scroll)
return;
scroll_pos = glui_get_scroll();
@ -704,11 +704,8 @@ static void glui_navigation_set(bool scroll)
menu_entries_set_start(menu_entries_get_start() - 5);
}
if (scroll)
menu_animation_push(disp->animation, 10, scroll_pos,
&menu->scroll_y, EASING_IN_OUT_QUAD, -1, NULL);
else
menu->scroll_y = scroll_pos;
menu_animation_push(disp->animation, 10, scroll_pos,
&menu->scroll_y, EASING_IN_OUT_QUAD, -1, NULL);
}
static void glui_navigation_clear(bool pending_push)
@ -738,7 +735,7 @@ static void glui_populate_entries(const char *path,
if (!menu)
return;
glui_navigation_set(false);
menu->scroll_y = glui_get_scroll();
}
static void glui_font(menu_handle_t *menu)