mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
(D3D8) Buildfixes
This commit is contained in:
parent
5b97ba65c0
commit
b43039f7b0
@ -386,6 +386,12 @@ static INLINE void d3d8_surface_unlock_rect(LPDIRECT3DSURFACE8 surf)
|
|||||||
IDirect3DSurface8_UnlockRect(surf);
|
IDirect3DSurface8_UnlockRect(surf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static INLINE void d3d8_unlock_rectangle(LPDIRECT3DTEXTURE8 tex)
|
||||||
|
{
|
||||||
|
if (tex)
|
||||||
|
IDirect3DTexture8_UnlockRect(tex, 0);
|
||||||
|
}
|
||||||
|
|
||||||
static INLINE bool d3d8_get_adapter_display_mode(
|
static INLINE bool d3d8_get_adapter_display_mode(
|
||||||
LPDIRECT3D8 d3d,
|
LPDIRECT3D8 d3d,
|
||||||
unsigned idx,
|
unsigned idx,
|
||||||
|
@ -551,11 +551,8 @@ static void d3d8_free_overlay(d3d8_video_t *d3d, overlay_t *overlay)
|
|||||||
if (!d3d)
|
if (!d3d)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IDirect3DTexture8_Release(overlay->tex);
|
d3d8_texture_free(overlay->tex);
|
||||||
if (overlay->vert_buf)
|
d3d8_vertex_buffer_free(overlay->vert_buf, NULL);
|
||||||
IDirect3DVertexBuffer8_Release(overlay->vert_buf);
|
|
||||||
overlay->vert_buf = NULL;
|
|
||||||
chain->vertex_buf = NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void d3d8_deinit_chain(d3d8_video_t *d3d)
|
static void d3d8_deinit_chain(d3d8_video_t *d3d)
|
||||||
@ -573,8 +570,7 @@ static void d3d8_deinitialize(d3d8_video_t *d3d)
|
|||||||
font_driver_free_osd();
|
font_driver_free_osd();
|
||||||
|
|
||||||
d3d8_deinit_chain(d3d);
|
d3d8_deinit_chain(d3d);
|
||||||
if (d3d->menu_display.buffer)
|
d3d8_vertex_buffer_free(d3d->menu_display.buffer, d3d->menu_display.decl);
|
||||||
IDirect3DVertexBuffer8_Release(d3d->menu_display.buffer);
|
|
||||||
d3d->menu_display.buffer = NULL;
|
d3d->menu_display.buffer = NULL;
|
||||||
d3d->menu_display.decl = NULL;
|
d3d->menu_display.decl = NULL;
|
||||||
}
|
}
|
||||||
@ -1431,7 +1427,7 @@ static bool d3d8_overlay_load(void *data,
|
|||||||
|
|
||||||
for (y = 0; y < height; y++, dst += pitch, src += width)
|
for (y = 0; y < height; y++, dst += pitch, src += width)
|
||||||
memcpy(dst, src, width << 2);
|
memcpy(dst, src, width << 2);
|
||||||
IDirect3DTexture8_UnlockRect(overlay->tex, 0);
|
d3d8_unlock_rectangle(overlay->tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
overlay->tex_w = width;
|
overlay->tex_w = width;
|
||||||
@ -1652,7 +1648,7 @@ static void d3d8_set_menu_texture_frame(void *data,
|
|||||||
d3d->menu->tex_h != height)
|
d3d->menu->tex_h != height)
|
||||||
{
|
{
|
||||||
if (d3d->menu)
|
if (d3d->menu)
|
||||||
IDirect3DTexture8_Release(d3d->menu->tex);
|
d3d8_texture_free(d3d->menu->tex);
|
||||||
|
|
||||||
d3d->menu->tex = d3d8_texture_new(d3d->dev, NULL,
|
d3d->menu->tex = d3d8_texture_new(d3d->dev, NULL,
|
||||||
width, height, 1,
|
width, height, 1,
|
||||||
@ -1715,7 +1711,7 @@ static void d3d8_set_menu_texture_frame(void *data,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (d3d->menu)
|
if (d3d->menu)
|
||||||
IDirect3DTexture8_UnlockRect(d3d->menu->tex, 0);
|
d3d8_unlock_rectangle(d3d->menu->tex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user