(XDK D3D) Some texture menu tweaks

This commit is contained in:
twinaphex 2013-11-15 02:44:17 +01:00
parent 1d067b9148
commit ef7d85c1ce

View File

@ -786,13 +786,13 @@ static inline void xdk_d3d_draw_texture(void *data)
menu_texture->x = 0;
menu_texture->y = 0;
if (d3d->rgui_texture_enable)
if (d3d->rgui_texture_enable && d3d->last_width && d3d->last_height)
{
d3d->d3d_render_device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
d3d->d3d_render_device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
d3d->d3d_render_device->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
texture_image_render(menu_texture, menu_texture->x, menu_texture->y,
640, 480, true);
d3d->last_width, d3d->last_height, true);
d3d->d3d_render_device->SetRenderState(D3DRS_ALPHABLENDENABLE, false);
}
#endif
@ -982,9 +982,7 @@ NULL, NULL, NULL, 0);
#ifdef HAVE_MENU
#if defined(HAVE_RMENU_XUI) || defined(HAVE_RGUI)
if (d3d->rgui_texture_enable)
#endif
xdk_d3d_draw_texture(d3d);
#endif