Ah there, that fixed it. :)
This commit is contained in:
parent
53654196fd
commit
78a17dbc64
1 changed files with 5 additions and 1 deletions
|
@ -553,8 +553,12 @@ GL_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
|
|||
rect->h, data->format, data->formattype,
|
||||
pixels);
|
||||
if (data->yuv) {
|
||||
const void *top;
|
||||
|
||||
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, (pitch / 2));
|
||||
|
||||
/* Skip to the top of the next texture */
|
||||
const void *top = (const void*)((const Uint8*)pixels + (texture->h-rect->y) * pitch - rect->x);
|
||||
top = (const void*)((const Uint8*)pixels + (texture->h-rect->y) * pitch - rect->x);
|
||||
|
||||
/* Skip to the correct offset into the next texture */
|
||||
pixels = (const void*)((const Uint8*)top + (rect->y / 2) * pitch + rect->x / 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue