mirror of
https://github.com/moonlight-stream/moonlight-qt
synced 2025-01-09 09:48:43 +00:00
parent
0ac765bc32
commit
eef270de26
1 changed files with 12 additions and 1 deletions
|
@ -301,7 +301,18 @@ public:
|
|||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_709);
|
||||
break;
|
||||
case COLORSPACE_REC_2020:
|
||||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
||||
// This is necessary to ensure HDR works properly with external displays on macOS Sonoma.
|
||||
if (frame->color_trc == AVCOL_TRC_SMPTE2084) {
|
||||
if (@available(macOS 11.0, *)) {
|
||||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2100_PQ);
|
||||
}
|
||||
else {
|
||||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceITUR_2020);
|
||||
}
|
||||
break;
|
||||
case COLORSPACE_REC_601:
|
||||
m_ColorSpace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
|
||||
|
|
Loading…
Reference in a new issue