From: Brendan Shanks <bshanks(a)codeweavers.com> --- dlls/winemac.drv/gdi.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index cfcf9990dd4..2da9c4ce5a4 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -46,7 +46,6 @@ static inline MACDRV_PDEVICE *get_macdrv_dev(PHYSDEV dev) static CGRect desktop_rect; /* virtual desktop rectangle */ static int horz_size; /* horz. size of screen in millimeters */ static int vert_size; /* vert. size of screen in millimeters */ -static int bits_per_pixel; /* pixel depth of screen */ static int device_data_valid; /* do the above variables have up-to-date values? */ int retina_on = FALSE; @@ -112,7 +111,6 @@ static void device_init(void) { CGDirectDisplayID mainDisplay = CGMainDisplayID(); CGSize size_mm = CGDisplayScreenSize(mainDisplay); - CGDisplayModeRef mode = CGDisplayCopyDisplayMode(mainDisplay); check_retina_status(); @@ -120,25 +118,6 @@ static void device_init(void) horz_size = size_mm.width; vert_size = size_mm.height; - bits_per_pixel = 32; - if (mode) - { - CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding(mode); - - if (pixelEncoding) - { - if (CFEqual(pixelEncoding, CFSTR(IO32BitDirectPixels))) - bits_per_pixel = 32; - else if (CFEqual(pixelEncoding, CFSTR(IO16BitDirectPixels))) - bits_per_pixel = 16; - else if (CFEqual(pixelEncoding, CFSTR(IO8BitIndexedPixels))) - bits_per_pixel = 8; - CFRelease(pixelEncoding); - } - - CGDisplayModeRelease(mode); - } - compute_desktop_rect(); device_data_valid = TRUE; @@ -234,9 +213,6 @@ static INT macdrv_GetDeviceCaps(PHYSDEV dev, INT cap) case VERTSIZE: ret = vert_size; break; - case BITSPIXEL: - ret = bits_per_pixel; - break; case HORZRES: case VERTRES: default: -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/9402