SDL_UpdateNVTexture: for D3D11, same notation as SDL_UpdateTexture (bug #5430)

This commit is contained in:
Sylvain Becker 2021-01-09 21:22:21 +01:00
parent 850d9c8c0d
commit b94718e0a7
1 changed files with 1 additions and 1 deletions

View File

@ -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, rect->h / 2, UVplane, UVpitch) < 0) {
if (D3D11_UpdateTextureInternal(rendererData, textureData->mainTextureNV, 2, rect->x / 2, rect->y / 2, ((rect->w + 1) / 2), (rect->h + 1) / 2, UVplane, UVpitch) < 0) {
return -1;
}
return 0;