From: Brendan Shanks bshanks@codeweavers.com
--- dlls/winemac.drv/cocoa_display.m | 5 +++++ dlls/winemac.drv/display.c | 1 + dlls/winemac.drv/macdrv_cocoa.h | 1 + 3 files changed, 7 insertions(+)
diff --git a/dlls/winemac.drv/cocoa_display.m b/dlls/winemac.drv/cocoa_display.m index db7cbc47118..d0a597a956f 100644 --- a/dlls/winemac.drv/cocoa_display.m +++ b/dlls/winemac.drv/cocoa_display.m @@ -986,6 +986,11 @@ int macdrv_get_monitors(CGDirectDisplayID adapter_id, struct macdrv_monitor** ne CFRelease(edid_data); }
+ monitors[monitor_count].hdr_enabled = false; +#if defined(MAC_OS_X_VERSION_10_15) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_15 + if (@available(macOS 10.15, *)) + monitors[monitor_count].hdr_enabled = (screen.maximumPotentialExtendedDynamicRangeColorComponentValue > 1.0) ? true : false; +#endif monitor_count++; break; } diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index 2a5c55093bd..506335a93f1 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -1095,6 +1095,7 @@ UINT macdrv_UpdateDisplayDevices(const struct gdi_device_manager *device_manager .rc_work = rect_from_cgrect(monitor->rc_work), .edid_len = monitor->edid_len, .edid = monitor->edid, + .hdr_enabled = monitor->hdr_enabled, }; device_manager->add_monitor( &gdi_monitor, param );
diff --git a/dlls/winemac.drv/macdrv_cocoa.h b/dlls/winemac.drv/macdrv_cocoa.h index 82ef110dce5..6a6b6975f55 100644 --- a/dlls/winemac.drv/macdrv_cocoa.h +++ b/dlls/winemac.drv/macdrv_cocoa.h @@ -255,6 +255,7 @@ static inline CGPoint cgpoint_win_from_mac(CGPoint point) CGRect rc_work; unsigned char *edid; uint32_t edid_len; + bool hdr_enabled; };
extern int macdrv_set_display_mode(CGDirectDisplayID id, CGDisplayModeRef display_mode);