diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 4ea4e5d0e7..6158f71710 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3551,8 +3551,16 @@ static void xmb_render(void *data, false); } + /* This must be set every frame when using a pointer, + * otherwise touchscreen input breaks when changing + * orientation */ + gfx_display_set_width(width); + gfx_display_set_height(height); + + /* Read pointer state */ menu_input_get_pointer_state(&xmb->pointer); + if (xmb->pointer.type != MENU_POINTER_DISABLED) { size_t selection = menu_navigation_get_selection(); @@ -3562,12 +3570,6 @@ static void xmb_render(void *data, int16_t pointer_x = xmb->pointer.x; int16_t pointer_y = xmb->pointer.y; - /* This must be set every frame when using a pointer, - * otherwise touchscreen input breaks when changing - * orientation */ - gfx_display_set_width(width); - gfx_display_set_height(height); - /* When determining current pointer selection, we * only track pointer movements between the left * and right screen margins */ @@ -5027,9 +5029,8 @@ static void xmb_frame(void *data, video_frame_info_t *video_info) video_height); font_driver_flush(video_width, video_height, xmb->font); - font_driver_bind_block(xmb->font, NULL); - font_driver_flush(video_width, video_height, xmb->font2); + font_driver_bind_block(xmb->font, NULL); font_driver_bind_block(xmb->font2, NULL); /* Draw fullscreen thumbnails, if required */