(XDK) Buildfixes

This commit is contained in:
twinaphex 2018-01-15 06:36:02 +01:00
parent c398db76d4
commit 59b5ecf7db
2 changed files with 13 additions and 0 deletions

View File

@ -1191,10 +1191,16 @@ bool d3d_set_vertex_shader_constantf(LPDIRECT3DDEVICE dev,
#ifdef __cplusplus
return (dev->SetVertexShaderConstantF(
start_register, constant_data, vector4f_count) == D3D_OK);
#else
#ifdef _XBOX
IDirect3DDevice9_SetVertexShaderConstantF(dev,
start_register, constant_data, vector4f_count);
return true;
#else
return (IDirect3DDevice9_SetVertexShaderConstantF(dev,
start_register, constant_data, vector4f_count) == D3D_OK);
#endif
#endif
#endif
return false;
}
@ -1231,8 +1237,13 @@ bool d3d_get_render_state(void *data, D3DRENDERSTATETYPE state, DWORD *value)
return false;
#if defined(HAVE_D3D9) && !defined(__cplusplus)
#ifdef _XBOX
IDirect3DDevice9_GetRenderState(dev, state, value);
return true;
#else
if (IDirect3DDevice9_GetRenderState(dev, state, value) == D3D_OK)
return true;
#endif
#elif defined(HAVE_D3D8) && !defined(__cplusplus)
if (IDirect3DDevice8_GetRenderState(dev, state, value) == D3D_OK)
return true;

View File

@ -1727,9 +1727,11 @@ static void video_texture_load_d3d(d3d_video_t *d3d,
LPDIRECT3DTEXTURE tex = NULL;
unsigned usage = 0;
#ifndef _XBOX
if((filter_type == TEXTURE_FILTER_MIPMAP_LINEAR) ||
(filter_type == TEXTURE_FILTER_MIPMAP_NEAREST))
usage |= D3DUSAGE_AUTOGENMIPMAP;
#endif
tex = d3d_texture_new(d3d->dev, NULL,
ti->width, ti->height, 0,