diff --git a/gfx/common/d3d8_common.h b/gfx/common/d3d8_common.h index fb97d277d4..01ff280d16 100644 --- a/gfx/common/d3d8_common.h +++ b/gfx/common/d3d8_common.h @@ -233,11 +233,9 @@ static INLINE void d3d8_end_scene(LPDIRECT3DDEVICE8 dev) static INLINE void d3d8_draw_primitive(LPDIRECT3DDEVICE8 dev, D3DPRIMITIVETYPE type, unsigned start, unsigned count) { - if (!d3d8_begin_scene(dev)) - return; - + IDirect3DDevice8_BeginScene(dev); IDirect3DDevice8_DrawPrimitive(dev, type, start, count); - d3d8_end_scene(dev); + IDirect3DDevice8_EndScene(dev); } static INLINE bool d3d8_lock_rectangle( diff --git a/gfx/drivers_display/gfx_display_d3d9hlsl.c b/gfx/drivers_display/gfx_display_d3d9hlsl.c index 2961af13bd..9a4274be4a 100644 --- a/gfx/drivers_display/gfx_display_d3d9hlsl.c +++ b/gfx/drivers_display/gfx_display_d3d9hlsl.c @@ -63,7 +63,7 @@ static void *gfx_display_d3d9_hlsl_get_default_mvp(void *data) return &id; } -static INT32 gfx_display_prim_to_d3d9_enum( +static INT32 gfx_display_prim_to_d3d9_hlsl_enum( enum gfx_display_prim_type prim_type) { switch (prim_type) @@ -127,6 +127,9 @@ static void gfx_display_d3d9_hlsl_draw(gfx_display_ctx_draw_t *draw, unsigned i; math_matrix_4x4 mop, m1, m2; LPDIRECT3DDEVICE9 dev; + D3DPRIMITIVETYPE type; + unsigned start = 0; + unsigned count = 0; d3d9_video_t *d3d = (d3d9_video_t*)data; Vertex * pv = NULL; const float *vertex = NULL; @@ -211,7 +214,7 @@ static void gfx_display_d3d9_hlsl_draw(gfx_display_ctx_draw_t *draw, if (draw && draw->texture) gfx_display_d3d9_bind_texture(draw, d3d); - type = (D3DPRIMITIVETYPE)gfx_display_prim_to_d3d9_cg_enum(draw->prim_type); + type = (D3DPRIMITIVETYPE)gfx_display_prim_to_d3d9_hlsl_enum(draw->prim_type); start = d3d->menu_display.offset; count = draw->coords->vertices - ((draw->prim_type == GFX_DISPLAY_PRIM_TRIANGLESTRIP)