From 02980119e4fb935432635d7c72e317b49acc2f64 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Mon, 1 Jun 2020 19:26:23 +0200 Subject: [PATCH] Fix #8066: Try another fallback colourspace if first one fails --- src/video/cocoa/wnd_quartz.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index c73dd32e7d..3bcbea126d 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -348,6 +348,8 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp) [this->window setColorSpace:[NSColorSpace sRGBColorSpace]]; this->color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB); + if (this->color_space == nullptr) this->color_space = CGColorSpaceCreateDeviceRGB(); + if (this->color_space == nullptr) error("Could not get a valid colour space for drawing."); bool ret = WindowResized(); this->UpdatePalette(0, 256);