mirror of
https://github.com/libretro/RetroArch.git
synced 2025-03-02 14:46:25 +00:00
Call video_driver_set_viewport directly
This commit is contained in:
parent
c133c2a10c
commit
3a37e13a54
@ -1634,16 +1634,6 @@ bool gfx_display_get_update_pending(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
void gfx_display_set_viewport(unsigned width, unsigned height)
|
||||
{
|
||||
video_driver_set_viewport(width, height, true, false);
|
||||
}
|
||||
|
||||
void gfx_display_unset_viewport(unsigned width, unsigned height)
|
||||
{
|
||||
video_driver_set_viewport(width, height, false, true);
|
||||
}
|
||||
|
||||
/* Checks if the display framebuffer has its 'dirty flag' set. This
|
||||
* means that the current contents of the framebuffer has changed
|
||||
* and that it has to be rendered to the screen. */
|
||||
|
@ -279,8 +279,6 @@ void gfx_display_set_framebuffer_pitch(size_t pitch);
|
||||
bool gfx_display_get_msg_force(void);
|
||||
void gfx_display_set_msg_force(bool state);
|
||||
bool gfx_display_get_update_pending(void);
|
||||
void gfx_display_set_viewport(unsigned width, unsigned height);
|
||||
void gfx_display_unset_viewport(unsigned width, unsigned height);
|
||||
bool gfx_display_get_framebuffer_dirty_flag(void);
|
||||
void gfx_display_set_framebuffer_dirty_flag(void);
|
||||
void gfx_display_unset_framebuffer_dirty_flag(void);
|
||||
|
@ -1321,7 +1321,7 @@ void gfx_widgets_frame(void *data)
|
||||
|
||||
p_dispwidget->gfx_widgets_frame_count++;
|
||||
|
||||
gfx_display_set_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, true, false);
|
||||
|
||||
/* Font setup */
|
||||
gfx_widgets_font_bind(&p_dispwidget->gfx_widget_fonts.regular);
|
||||
@ -1550,7 +1550,7 @@ void gfx_widgets_frame(void *data)
|
||||
gfx_widgets_font_unbind(&p_dispwidget->gfx_widget_fonts.bold);
|
||||
gfx_widgets_font_unbind(&p_dispwidget->gfx_widget_fonts.msg_queue);
|
||||
|
||||
gfx_display_unset_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
bool gfx_widgets_init(uintptr_t widgets_active_ptr,
|
||||
|
@ -6585,7 +6585,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
if (!mui)
|
||||
return;
|
||||
|
||||
gfx_display_set_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, true, false);
|
||||
|
||||
/* Clear text */
|
||||
materialui_font_bind(&mui->font_data.title);
|
||||
@ -6796,7 +6796,7 @@ static void materialui_frame(void *data, video_frame_info_t *video_info)
|
||||
materialui_font_unbind(&mui->font_data.list);
|
||||
materialui_font_unbind(&mui->font_data.hint);
|
||||
|
||||
gfx_display_unset_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
/* Determines current list view type, based on
|
||||
|
@ -2697,7 +2697,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
last_use_preferred_system_color_theme = use_preferred_system_color_theme;
|
||||
}
|
||||
|
||||
gfx_display_set_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, true, false);
|
||||
|
||||
/* Clear text */
|
||||
ozone_font_bind(&ozone->fonts.footer);
|
||||
@ -2915,7 +2915,7 @@ static void ozone_frame(void *data, video_frame_info_t *video_info)
|
||||
ozone_font_unbind(&ozone->fonts.entries_sublabel);
|
||||
ozone_font_unbind(&ozone->fonts.sidebar);
|
||||
|
||||
gfx_display_unset_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
static void ozone_set_header(ozone_handle_t *ozone)
|
||||
|
@ -3082,7 +3082,7 @@ static void stripes_frame(void *data, video_frame_info_t *video_info)
|
||||
video_height);
|
||||
}
|
||||
|
||||
gfx_display_unset_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
static void stripes_layout_ps3(stripes_handle_t *stripes, int width, int height)
|
||||
|
@ -4025,7 +4025,7 @@ static void xmb_draw_bg(
|
||||
draw.pipeline_active = xmb_shader_pipeline_active(menu_shader_pipeline);
|
||||
|
||||
gfx_display_blend_begin(userdata);
|
||||
gfx_display_set_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, true, false);
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (menu_shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER
|
||||
@ -5231,7 +5231,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
video_height);
|
||||
}
|
||||
|
||||
gfx_display_unset_viewport(video_width, video_height);
|
||||
video_driver_set_viewport(video_width, video_height, false, true);
|
||||
}
|
||||
|
||||
static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
|
||||
|
12
retroarch.c
12
retroarch.c
@ -32028,16 +32028,14 @@ error:
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_driver_set_viewport(unsigned width, unsigned height,
|
||||
void video_driver_set_viewport(unsigned width, unsigned height,
|
||||
bool force_fullscreen, bool allow_rotate)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
if (!p_rarch->current_video || !p_rarch->current_video->set_viewport)
|
||||
return false;
|
||||
p_rarch->current_video->set_viewport(
|
||||
p_rarch->video_driver_data, width, height,
|
||||
force_fullscreen, allow_rotate);
|
||||
return true;
|
||||
if (p_rarch->current_video && p_rarch->current_video->set_viewport)
|
||||
p_rarch->current_video->set_viewport(
|
||||
p_rarch->video_driver_data, width, height,
|
||||
force_fullscreen, allow_rotate);
|
||||
}
|
||||
|
||||
bool video_driver_set_rotation(unsigned rotation)
|
||||
|
@ -1610,7 +1610,7 @@ void video_driver_set_filtering(unsigned index, bool smooth, bool ctx_scaling);
|
||||
|
||||
const char *video_driver_get_ident(void);
|
||||
|
||||
bool video_driver_set_viewport(unsigned width, unsigned height,
|
||||
void video_driver_set_viewport(unsigned width, unsigned height,
|
||||
bool force_fullscreen, bool allow_rotate);
|
||||
|
||||
void video_driver_get_size(unsigned *width, unsigned *height);
|
||||
|
Loading…
x
Reference in New Issue
Block a user