From fc61ecb25cf7690e363513fb55b08008da2abe4e Mon Sep 17 00:00:00 2001 From: Sylvain Becker Date: Tue, 5 Jan 2021 21:54:03 +0100 Subject: [PATCH] Fix software UpdateNVTexture non fullscreen (bug #5430) --- src/render/SDL_yuv_sw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/render/SDL_yuv_sw.c b/src/render/SDL_yuv_sw.c index 8b8bf9b12..a6c22afed 100644 --- a/src/render/SDL_yuv_sw.c +++ b/src/render/SDL_yuv_sw.c @@ -322,7 +322,7 @@ int SDL_SW_UpdateNVTexturePlanar(SDL_SW_YUVTexture * swdata, const SDL_Rect * re /* Copy the UV or VU plane */ src = UVplane; dst = swdata->pixels + swdata->h * swdata->w; - dst += rect->y/2 * ((swdata->w + 1)/2) + rect->x/2; + dst += rect->y * ((swdata->w + 1)/2) + rect->x; length = (rect->w + 1) / 2; length *= 2; for (row = 0; row < (rect->h + 1)/2; ++row) {