mirror of
https://github.com/shadps4-emu/ext-SDL.git
synced 2024-11-30 13:30:36 +00:00
testcolorspace: don't tonemap from HDR to SDR when reading pixels
Our source content is in the SDR range, so we don't need to tonemap when reading it back.
This commit is contained in:
parent
4e43da684c
commit
3f7f6f624b
@ -157,6 +157,9 @@ static SDL_bool ReadPixel(int x, int y, SDL_Color *c)
|
||||
|
||||
surface = SDL_RenderReadPixels(renderer, &r);
|
||||
if (surface) {
|
||||
/* Don't tonemap back to SDR, our source content was SDR */
|
||||
SDL_SetStringProperty(SDL_GetSurfaceProperties(surface), SDL_PROP_SURFACE_TONEMAP_OPERATOR_STRING, "*=1");
|
||||
|
||||
if (SDL_ReadSurfacePixel(surface, 0, 0, &c->r, &c->g, &c->b, &c->a)) {
|
||||
result = SDL_TRUE;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user