Ken Thomases : winemac: Interpret Windows bitmap data, especially window surfaces, as sRGB.
Module: wine Branch: master Commit: 650997d71db173c59a6480998168d5b89b7688c3 URL: https://source.winehq.org/git/wine.git/?a=commit;h=650997d71db173c59a6480998... Author: Ken Thomases <ken(a)codeweavers.com> Date: Sun Jul 15 13:52:57 2018 -0500 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 <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 4090350..e5f3a4c 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 67e0dce..91c5b88 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 1230bbe..73daeca 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,
participants (1)
-
Alexandre Julliard