mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(menu_driver.c) Get rid of video_driver_get_size call
This commit is contained in:
parent
1a30cfea09
commit
afd4494c2f
@ -1211,7 +1211,7 @@ static void mui_frame(void *data, video_frame_info_t *video_info)
|
||||
menu_display_set_alpha(header_bg_color_real, settings->menu.header.opacity);
|
||||
menu_display_set_alpha(footer_bg_color_real, settings->menu.footer.opacity);
|
||||
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
header_height = menu_display_get_header_height();
|
||||
|
||||
if (libretro_running)
|
||||
|
@ -250,6 +250,7 @@ static void nk_menu_get_message(void *data, const char *message)
|
||||
|
||||
static void nk_draw_bg(
|
||||
nk_menu_handle_t *nk,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
float alpha,
|
||||
@ -273,7 +274,7 @@ static void nk_draw_bg(
|
||||
draw.pipeline.id = 0;
|
||||
|
||||
menu_display_blend_begin();
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
draw.pipeline.id = VIDEO_SHADER_MENU_5;
|
||||
draw.pipeline.active = false;
|
||||
@ -333,7 +334,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
nk_input_begin(&nk->ctx);
|
||||
nk_menu_input_gamepad(nk);
|
||||
@ -350,7 +351,7 @@ static void nk_menu_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
nk_input_end(&nk->ctx);
|
||||
nk_menu_main(nk);
|
||||
nk_draw_bg(nk, width, height, 0.5, nk->textures.bg, coord_black, coord_white);
|
||||
nk_draw_bg(nk, video_info, width, height, 0.5, nk->textures.bg, coord_black, coord_white);
|
||||
nk_common_device_draw(&device, &nk->ctx, width, height, NK_ANTI_ALIASING_ON);
|
||||
|
||||
menu_display_draw_cursor(
|
||||
|
@ -2413,6 +2413,7 @@ static bool xmb_shader_pipeline_active(settings_t *settings)
|
||||
|
||||
static void xmb_draw_bg(
|
||||
xmb_handle_t *xmb,
|
||||
video_frame_info_t *video_info,
|
||||
unsigned width,
|
||||
unsigned height,
|
||||
float alpha,
|
||||
@ -2427,7 +2428,7 @@ static void xmb_draw_bg(
|
||||
RARCH_LOG("DRAW BG %d %d \n",width,height);
|
||||
#endif
|
||||
|
||||
bool running = menu_display_libretro_running();
|
||||
bool running = menu_display_libretro_running();
|
||||
|
||||
draw.x = 0;
|
||||
draw.y = 0;
|
||||
@ -2443,7 +2444,7 @@ static void xmb_draw_bg(
|
||||
draw.pipeline.active = xmb_shader_pipeline_active(settings);
|
||||
|
||||
menu_display_blend_begin();
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
if (settings->menu.xmb.shader_pipeline > XMB_SHADER_PIPELINE_WALLPAPER
|
||||
@ -2601,6 +2602,7 @@ static void xmb_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
xmb_draw_bg(
|
||||
xmb,
|
||||
video_info,
|
||||
width,
|
||||
height,
|
||||
xmb->alpha,
|
||||
|
@ -417,7 +417,7 @@ static void xui_frame(void *data, video_frame_info_t *video_info)
|
||||
if (!d3dr)
|
||||
return;
|
||||
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
app.RunFrame();
|
||||
XuiTimersRun();
|
||||
|
@ -878,7 +878,7 @@ static void zarch_frame(void *data, video_frame_info_t *video_info)
|
||||
|
||||
video_driver_get_size(&zui->width, &zui->height);
|
||||
|
||||
menu_display_set_viewport();
|
||||
menu_display_set_viewport(video_info->width, video_info->height);
|
||||
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
|
@ -397,10 +397,8 @@ bool menu_display_get_update_pending(void)
|
||||
return false;
|
||||
}
|
||||
|
||||
void menu_display_set_viewport(void)
|
||||
void menu_display_set_viewport(unsigned width, unsigned height)
|
||||
{
|
||||
unsigned width, height;
|
||||
video_driver_get_size(&width, &height);
|
||||
video_driver_set_viewport(width, height, true, false);
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ void menu_display_set_msg_force(bool state);
|
||||
bool menu_display_get_font_data_init(void);
|
||||
void menu_display_set_font_data_init(bool state);
|
||||
bool menu_display_get_update_pending(void);
|
||||
void menu_display_set_viewport(void);
|
||||
void menu_display_set_viewport(unsigned width, unsigned height);
|
||||
void menu_display_unset_viewport(void);
|
||||
bool menu_display_get_framebuffer_dirty_flag(void);
|
||||
void menu_display_set_framebuffer_dirty_flag(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user