diff --git a/client/renderers/EGL/cursor.c b/client/renderers/EGL/cursor.c index 174cbb68..b81d1cd2 100644 --- a/client/renderers/EGL/cursor.c +++ b/client/renderers/EGL/cursor.c @@ -180,7 +180,7 @@ bool egl_cursorInit(EGL_Cursor ** cursor) atomic_init(&(*cursor)->scale , 1.0f ); atomic_init(&(*cursor)->mapSDRtoPQ, false); atomic_init(&(*cursor)->sdrWhiteLevel, - (float)KVMFR_SDR_WHITE_LEVEL_DEFAULT); + KVMFR_SDR_WHITE_LEVEL_DEFAULT); return true; } @@ -446,6 +446,6 @@ void egl_cursorSetHDRState(EGL_Cursor * cursor, bool hdrActive, bool hdrPQ, float sdrWhiteLevel) { atomic_store(&cursor->sdrWhiteLevel, sdrWhiteLevel > 0.0f ? - sdrWhiteLevel : (float)KVMFR_SDR_WHITE_LEVEL_DEFAULT); + sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT); atomic_store(&cursor->mapSDRtoPQ, hdrActive && hdrPQ); } diff --git a/common/include/common/KVMFR.h b/common/include/common/KVMFR.h index 1929c7bc..42eb6f9f 100644 --- a/common/include/common/KVMFR.h +++ b/common/include/common/KVMFR.h @@ -32,7 +32,7 @@ // Fallback used by producers that cannot report the source display's SDR // white level. IDD frames override this with IDDCX_METADATA2::SdrWhiteLevel. -#define KVMFR_SDR_WHITE_LEVEL_DEFAULT 203u +#define KVMFR_SDR_WHITE_LEVEL_DEFAULT 203 #define KVMFR_MAX_DAMAGE_RECTS 64 diff --git a/obs/lg.c b/obs/lg.c index 4adc445d..2d5ce853 100644 --- a/obs/lg.c +++ b/obs/lg.c @@ -883,7 +883,7 @@ static void lgFormatInit(LGPlugin * this, const KVMFRFrame * frame, this->hdr = frame->flags & FRAME_FLAG_HDR; this->hdrPQ = frame->flags & FRAME_FLAG_HDR_PQ; this->sdrWhiteLevel = frame->sdrWhiteLevel ? - (float)frame->sdrWhiteLevel : (float)KVMFR_SDR_WHITE_LEVEL_DEFAULT; + frame->sdrWhiteLevel : KVMFR_SDR_WHITE_LEVEL_DEFAULT; if (this->hdr && this->hdrPQ) lgComputeColorMatrix(this);