diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index b1d7f3773..5e1b825b9 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -2137,7 +2137,7 @@ static int D3D11_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, D3D11_BOX srcBox; D3D11_MAPPED_SUBRESOURCE textureMemory; - ID3D11DeviceContext_OMGetRenderTargets(data->d3dContext, 1, &renderTargetView, NULL); + renderTargetView = D3D11_GetCurrentRenderTargetView(renderer); if (renderTargetView == NULL) { SDL_SetError("%s, ID3D11DeviceContext::OMGetRenderTargets failed", __FUNCTION__); goto done;