-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Recently I installed 2 new (latest) nvidia graphics drivers on Windows 10 64 bit. Since then my SDL3 v3.2.28 application's color hardware cursors created by SDL_CreateColorCursor from SDL surface with SDL_PIXELFORMAT_ARGB8888 data all look washed out. Their brightness or gamma is off.
Setting color space for surface with SDL_SetSurfaceColorspace has no visible effect on the outcome. Converting my sRGB data to linear RGB fixes the issue. But there is absolutely no way to tell what format the OS or whatever driver expects.
I had to add a configuration switch to the application that conditionally enables sRGB to linear RGB conversion on the cursor raw pixel data:
float srgb_to_linear(float c)
{
if (c <= 0.04045f)
return c / 12.92f;
else
return powf((c + 0.055f) / 1.055f, 2.4f);
}
The above result is packed back into the ARGB8888 surface.
Did anyone else bump into this issue? How am I supposed to solve this?