Skip to content

Commit

Permalink
[d3d8] Remove extra ref on temporary blit surfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
WinterSnowfall authored and AlpyneDreams committed Jul 7, 2024
1 parent 789c4a1 commit d422735
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/d3d8/d3d8_surface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ namespace dxvk {
d3d9::D3DSURFACE_DESC desc;
GetD3D9()->GetDesc(&desc);

// NOTE: This adds a D3DPOOL_DEFAULT resource to the
// device, which counts as losable during device reset
Com<d3d9::IDirect3DSurface9> image = nullptr;
HRESULT res = GetParent()->GetD3D9()->CreateRenderTarget(
desc.Width, desc.Height, desc.Format,
Expand All @@ -19,7 +21,6 @@ namespace dxvk {
if (FAILED(res))
throw new DxvkError("D3D8: Failed to create blit image");

image.ref();
return image;
}
}

0 comments on commit d422735

Please sign in to comment.