From 204ef3b5098861907ee33a63f40171a1155e79e1 Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Tue, 5 Jan 2021 20:38:31 +0100 Subject: [PATCH] Fix D3D11 UpdateNVTexture (bug #5430) --- src/render/direct3d11/SDL_render_d3d11.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index ec8f13b89..f3c2d42f8 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -1422,7 +1422,7 @@ D3D11_UpdateTextureNV(SDL_Renderer * renderer, SDL_Texture * texture, return -1; } - if (D3D11_UpdateTextureInternal(rendererData, textureData->mainTextureNV, SDL_BYTESPERPIXEL(texture->format), rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, UVplane, UVpitch / 2) < 0) { + if (D3D11_UpdateTextureInternal(rendererData, textureData->mainTextureNV, SDL_BYTESPERPIXEL(texture->format), rect->x, rect->y, rect->w, rect->h / 2, UVplane, UVpitch) < 0) { return -1; } return 0;