Fix. Restore depth stencil surface.

This commit is contained in:
aignacio_sf 2008-10-02 18:56:17 +00:00
parent cce4f2195e
commit 46ada8c264

View File

@ -1706,14 +1706,12 @@ fill_d3d_texture_pixels(DXScreenData &scrn) {
IDirect3DSurface9 *depth_stencil_surface;
// turn off depth stencil when clearing texture if it exists
depth_stencil_surface = 0;
if (device -> GetDepthStencilSurface (&depth_stencil_surface) == D3D_OK) {
if (device -> SetDepthStencilSurface (NULL) == D3D_OK) {
}
}
else {
depth_stencil_surface = 0;
}
if (device -> SetRenderTarget (0, surface) == D3D_OK) {
DWORD flags;
@ -1727,6 +1725,7 @@ fill_d3d_texture_pixels(DXScreenData &scrn) {
// restore depth stencil
if (depth_stencil_surface) {
device -> SetDepthStencilSurface (depth_stencil_surface);
depth_stencil_surface -> Release();
}