From 650997d71db173c59a6480998168d5b89b7688c3 Mon Sep 17 00:00:00 2001 From: Ken Thomases Date: Sun, 15 Jul 2018 13:52:57 -0500 Subject: [PATCH] winemac: Interpret Windows bitmap data, especially window surfaces, as sRGB. This makes the display match that of native apps. For example, the UI of Mac Steam vs. Windows Steam or a PNG shown in iexplore.exe vs. Preview. Signed-off-by: Ken Thomases Signed-off-by: Alexandre Julliard --- dlls/winemac.drv/image.c | 2 +- dlls/winemac.drv/mouse.c | 2 +- dlls/winemac.drv/surface.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/winemac.drv/image.c b/dlls/winemac.drv/image.c index 4090350c448..e5f3a4c0fa6 100644 --- a/dlls/winemac.drv/image.c +++ b/dlls/winemac.drv/image.c @@ -85,7 +85,7 @@ CGImageRef create_cgimage_from_icon_bitmaps(HDC hdc, HANDLE icon, HBITMAP hbmCol else alpha_format = kCGImageAlphaNoneSkipFirst; - colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); + colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); if (!colorspace) { WARN("failed to create colorspace\n"); diff --git a/dlls/winemac.drv/mouse.c b/dlls/winemac.drv/mouse.c index 67e0dcec123..91c5b8895b1 100644 --- a/dlls/winemac.drv/mouse.c +++ b/dlls/winemac.drv/mouse.c @@ -357,7 +357,7 @@ CFArrayRef create_monochrome_cursor(HDC hdc, const ICONINFOEXW *icon, int width, for (i = 0; i < count; i++) data_bits[i] ^= xor_bits[i]; - colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGray); + colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericGrayGamma2_2); if (!colorspace) { WARN("failed to create colorspace\n"); diff --git a/dlls/winemac.drv/surface.c b/dlls/winemac.drv/surface.c index 1230bbed736..73daecaa81c 100644 --- a/dlls/winemac.drv/surface.c +++ b/dlls/winemac.drv/surface.c @@ -384,7 +384,7 @@ CGImageRef create_surface_image(void *window_surface, CGRect *rect, int copy_dat visrect = CGRectOffset(*rect, -surface->header.rect.left, -surface->header.rect.top); - colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); + colorspace = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); bytes_per_row = get_dib_stride(width, 32); offset = CGRectGetMinX(visrect) * 4 + (height - CGRectGetMaxY(visrect)) * bytes_per_row; size = min(CGRectGetHeight(visrect) * bytes_per_row,