From ffaafbc77cd6739321b73dd63b4e0e9a8fc9edea Mon Sep 17 00:00:00 2001 From: natinusala Date: Tue, 27 Nov 2018 15:32:43 +0100 Subject: [PATCH] ozone: fix scroll when rebinding inputs --- menu/drivers/ozone/ozone.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index a35feded9e..b5d4a177d9 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -774,9 +774,8 @@ static void ozone_update_scroll(ozone_handle_t *ozone, bool allow_animation, ozo bottom_boundary = video_info_height - 87 - 78; entries_middle = video_info_height/2; - if (current_selection_middle_onscreen != entries_middle) - new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle); - + new_scroll = ozone->animations.scroll_y - (current_selection_middle_onscreen - entries_middle); + if (new_scroll + ozone->entries_height < bottom_boundary) new_scroll = -(78 + ozone->entries_height - bottom_boundary);