diff --git a/gfx/gfx_widgets.c b/gfx/gfx_widgets.c index 1e04662928..83f3d8cd6a 100644 --- a/gfx/gfx_widgets.c +++ b/gfx/gfx_widgets.c @@ -1811,6 +1811,9 @@ static void gfx_widgets_context_reset( char monochrome_png_path[PATH_MAX_LENGTH]; char gfx_widgets_path[PATH_MAX_LENGTH]; char theme_path[PATH_MAX_LENGTH]; +#ifdef HAVE_XMB + gfx_display_t *p_disp = disp_get_ptr(); +#endif xmb_path[0] = '\0'; monochrome_png_path[0] = '\0'; @@ -1902,9 +1905,7 @@ static void gfx_widgets_context_reset( p_dispwidget->last_video_width = width; p_dispwidget->last_video_height = height; #ifdef HAVE_XMB - gfx_display_t *p_disp = disp_get_ptr(); - enum menu_driver_id_type type = p_disp->menu_driver_id; - if (type == MENU_DRIVER_ID_XMB) + if (p_disp->menu_driver_id == MENU_DRIVER_ID_XMB) p_dispwidget->last_scale_factor = gfx_display_get_widget_pixel_scale( p_dispwidget->last_video_width, p_dispwidget->last_video_height, fullscreen);