(Xbox 1) Fix texture U/V

This commit is contained in:
twinaphex 2018-01-20 07:00:03 +01:00
parent 1d9ea0297e
commit 9f7d0d59c5
2 changed files with 12 additions and 1 deletions

View File

@ -84,7 +84,7 @@ int font_renderer_create_default(const void **data, void **handle,
#ifdef HAVE_D3D
static const font_renderer_t *d3d_font_backends[] = {
#elif defined(_XBOX360)
#if defined(_XBOX360)
&d3d_xbox360_font,
#elif defined(_WIN32) && defined(HAVE_D3DX)
&d3d_win32_font,

View File

@ -169,6 +169,17 @@ static void menu_display_d3d_draw(void *data)
pv[i].z = 0.5f;
pv[i].u = *tex_coord++;
pv[i].v = *tex_coord++;
#ifdef _XBOX1
{
D3DSURFACE_DESC desc;
if (d3d_texture_get_level_desc((LPDIRECT3DTEXTURE)
draw->texture, 0, &desc))
{
pv[i].u *= desc.Width;
pv[i].v *= desc.Height;
}
}
#endif
pv[i].color =
D3DCOLOR_ARGB(