Skip to content

Commit

Permalink
Fix for sskodje#280 : Error when copying texture with CPU.
Browse files Browse the repository at this point in the history
  • Loading branch information
sskodje authored and yujahyf97 committed Apr 19, 2024
1 parent fc64695 commit 309f447
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ScreenRecorderLibNative/TextureManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ HRESULT TextureManager::CopyTextureWithCPU(_In_ ID3D11Device *pDevice, _In_ ID3D
stagingDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
stagingDesc.Usage = D3D11_USAGE_STAGING;
stagingDesc.MiscFlags = 0;
stagingDesc.BindFlags = D3D11_BIND_RENDER_TARGET;
stagingDesc.BindFlags = 0;
RETURN_ON_BAD_HR(hr = pSourceDevice->CreateTexture2D(&stagingDesc, nullptr, &pStagingTexture));
//Copy the source surface to the new staging texture.
pDuplicationDeviceContext->CopyResource(pStagingTexture, pSourceTexture);
Expand Down

0 comments on commit 309f447

Please sign in to comment.