mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-07-21 14:52:04 +00:00
[client] wayland: use the locally configured white level for SDR
This commit is contained in:
@@ -115,7 +115,6 @@ static bool waylandInit(const LG_DSInitParams params)
|
||||
atomic_init(&wlWm.cmCanDoHDR, false);
|
||||
atomic_init(&wlWm.hdrPQWhiteLevel, 203);
|
||||
atomic_init(&wlWm.hdrScRGBWhiteLevel, 80);
|
||||
atomic_init(&wlWm.hdrActivePQWhiteLevel, 203);
|
||||
|
||||
wlWm.display = wl_display_connect(NULL);
|
||||
if (!wlWm.display)
|
||||
@@ -236,12 +235,9 @@ static bool waylandGetProp(LG_DSProperty prop, void * ret)
|
||||
|
||||
if (prop == LG_DS_HDR_WHITE_LEVELS)
|
||||
{
|
||||
const bool activePQ = atomic_load(&wlWm.hdrActive) &&
|
||||
atomic_load(&wlWm.hdrActivePQ);
|
||||
*(LG_DSHDRWhiteLevels *)ret = (LG_DSHDRWhiteLevels)
|
||||
{
|
||||
.pq = activePQ ? atomic_load(&wlWm.hdrActivePQWhiteLevel) :
|
||||
atomic_load(&wlWm.hdrPQWhiteLevel),
|
||||
.pq = atomic_load(&wlWm.hdrPQWhiteLevel),
|
||||
.scRGB = atomic_load(&wlWm.hdrScRGBWhiteLevel),
|
||||
};
|
||||
return true;
|
||||
@@ -282,7 +278,7 @@ static bool waylandHDRCallback(const void * rendererFormat)
|
||||
return waylandRequestHDR(format->hdrDisplayPrimary, format->hdrWhitePoint,
|
||||
format->hdrMaxDisplayLuminance, format->hdrMinDisplayLuminance,
|
||||
format->hdrMaxContentLightLevel, format->hdrMaxFrameAverageLightLevel,
|
||||
format->hdrPQ, format->hdrMetadata);
|
||||
format->sdrWhiteLevel, format->hdrPQ, format->hdrMetadata);
|
||||
else
|
||||
waylandRequestClearHDR();
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user