mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-23 21:55:12 +00:00
Made error handling more consistent in D3D12_RenderReadPixels()
(cherry picked from commit 90262f274ab73a2a0db227f8a1a3ea823ba0faec)
This commit is contained in:
parent
bf277eb808
commit
d65185a6a7
|
@ -2837,8 +2837,8 @@ static int D3D12_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect,
|
||||||
NULL,
|
NULL,
|
||||||
(void **)&textureMemory);
|
(void **)&textureMemory);
|
||||||
if (FAILED(result)) {
|
if (FAILED(result)) {
|
||||||
SAFE_RELEASE(readbackBuffer);
|
WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Resource::Map [map staging texture]"), result);
|
||||||
return WIN_SetErrorFromHRESULT(SDL_COMPOSE_ERROR("ID3D12Resource::Map [map staging texture]"), result);
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Copy the data into the desired buffer, converting pixels to the
|
/* Copy the data into the desired buffer, converting pixels to the
|
||||||
|
|
Loading…
Reference in a new issue