display_sdl: Fix incorrect blend mode during display_read
The blend mode was set in a way that multiplied pixels with the alpha value during read, which caused tests to fail. Signed-off-by: Martin Stumpf <finomnis@gmail.com>
This commit is contained in:
parent
f01a96c2f3
commit
2c1cef9659
1 changed files with 2 additions and 0 deletions
|
@ -154,11 +154,13 @@ int sdl_display_read_bottom(const uint16_t height, const uint16_t width,
|
||||||
}
|
}
|
||||||
|
|
||||||
SDL_SetRenderTarget(renderer, read_texture);
|
SDL_SetRenderTarget(renderer, read_texture);
|
||||||
|
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_NONE);
|
||||||
|
|
||||||
SDL_RenderClear(renderer);
|
SDL_RenderClear(renderer);
|
||||||
SDL_RenderCopy(renderer, texture, NULL, NULL);
|
SDL_RenderCopy(renderer, texture, NULL, NULL);
|
||||||
SDL_RenderReadPixels(renderer, &rect, SDL_PIXELFORMAT_ARGB8888, buf, width * 4);
|
SDL_RenderReadPixels(renderer, &rect, SDL_PIXELFORMAT_ARGB8888, buf, width * 4);
|
||||||
|
|
||||||
|
SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
|
||||||
SDL_SetRenderTarget(renderer, NULL);
|
SDL_SetRenderTarget(renderer, NULL);
|
||||||
|
|
||||||
SDL_UnlockMutex(mutex);
|
SDL_UnlockMutex(mutex);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue