(360) Add viewport hack for now so that XUI doesn't get

cut off depending on the viewport of the game
This commit is contained in:
twinaphex 2013-04-19 23:22:58 +02:00
parent 7fb7077f56
commit 419620a49e
2 changed files with 12 additions and 4 deletions

View File

@ -1803,10 +1803,22 @@ deinit:
bool menu_iterate_xui(void)
{
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
LPDIRECT3DDEVICE d3dr = (LPDIRECT3DDEVICE)d3d->d3d_render_device;
app.RunFrame(); /* Update XUI */
XuiRenderBegin( app.GetDC(), D3DCOLOR_ARGB( 255, 0, 0, 0 ) );
D3DVIEWPORT vp = {0};
vp.Width = d3d->win_width;
vp.Height = d3d->win_height;
vp.X = 0;
vp.Y = 0;
vp.MinZ = 0.0f;
vp.MaxZ = 1.0f;
RD3DDevice_SetViewport(d3dr, &vp);
D3DXMATRIX matOrigView;
XuiRenderGetViewTransform( app.GetDC(), &matOrigView );

View File

@ -817,10 +817,6 @@ static bool xdk_d3d_frame(void *data, const void *frame,
D3DSurface* pRenderTarget0;
#endif
#ifndef _XBOX1
RD3DDevice_Clear(d3d->d3d_render_device, 0, NULL, D3DCLEAR_TARGET, 0xff000000, 1.0f, 0);
#endif
if (d3d->last_width != width || d3d->last_height != height)
{
D3DLOCKED_RECT d3dlr;