mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-28 18:50:29 +00:00
Create menu_display_unset_viewport
This commit is contained in:
parent
d3dba0edc2
commit
17515d66ed
@ -564,7 +564,7 @@ static void glui_frame(void)
|
||||
|
||||
gl->shader->use(gl, GL_SHADER_STOCK_BLEND);
|
||||
|
||||
gl_set_viewport(gl, global->video_data.width, global->video_data.height, false, true);
|
||||
menu_display_unset_viewport(menu);
|
||||
}
|
||||
|
||||
static void *glui_init(void)
|
||||
|
@ -420,6 +420,7 @@ static void rmenu_xui_frame(void)
|
||||
D3DXMATRIX matOrigView;
|
||||
D3DVIEWPORT vp_full;
|
||||
LPDIRECT3DDEVICE d3dr;
|
||||
const char *message;
|
||||
d3d_video_t *d3d = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
@ -451,20 +452,20 @@ static void rmenu_xui_frame(void)
|
||||
|
||||
XuiRenderSetViewTransform( app.GetDC(), &matOrigView );
|
||||
|
||||
const char *message = rarch_main_msg_queue_pull();
|
||||
message = rarch_main_msg_queue_pull();
|
||||
|
||||
if (message)
|
||||
xui_render_message(message);
|
||||
else
|
||||
{
|
||||
const char *message = rarch_main_msg_queue_pull();
|
||||
message = rarch_main_msg_queue_pull();
|
||||
if (message)
|
||||
xui_render_message(message);
|
||||
}
|
||||
|
||||
XuiRenderEnd( app.GetDC() );
|
||||
|
||||
d3d_set_viewport(d3dr, &d3d->final_viewport);
|
||||
menu_display_unset_viewport(menu);
|
||||
}
|
||||
|
||||
static void blit_line(int x, int y, const char *message, bool green)
|
||||
|
@ -1452,7 +1452,7 @@ static void xmb_frame(void)
|
||||
if (settings->menu.mouse.enable)
|
||||
xmb_draw_cursor(gl, xmb, menu->mouse.x, menu->mouse.y);
|
||||
|
||||
gl_set_viewport(gl, global->video_data.width, global->video_data.height, false, true);
|
||||
menu_display_unset_viewport(menu);
|
||||
}
|
||||
|
||||
static void *xmb_init(void)
|
||||
|
@ -197,3 +197,30 @@ void menu_display_set_viewport(menu_handle_t *menu)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void menu_display_unset_viewport(menu_handle_t *menu)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
const char *ident = video_driver_get_ident();
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
if (!strcmp(ident, "gl"))
|
||||
{
|
||||
gl_set_viewport(driver->video_data,
|
||||
global->video_data.width,
|
||||
global->video_data.height,
|
||||
false, true);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_D3D
|
||||
if (!strcmp(ident, "d3d"))
|
||||
{
|
||||
d3d_video_t *d3d = (d3d_video_t*)driver->video_data;
|
||||
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->dev;
|
||||
d3d_set_viewport(d3dr, &d3d->final_viewport);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -44,6 +44,10 @@ bool menu_display_font_bind_block(menu_handle_t *menu,
|
||||
bool menu_display_font_flush_block(menu_handle_t *menu,
|
||||
const struct font_renderer *font_driver);
|
||||
|
||||
void menu_display_set_viewport(menu_handle_t *menu);
|
||||
|
||||
void menu_display_unset_viewport(menu_handle_t *menu);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user