From 764497206ab9457ab5dff3ea7851546da9259cc4 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Mon, 1 Jun 2020 19:26:23 +0200 Subject: Fix #8066: Try another fallback colourspace if first one fails --- src/video/cocoa/wnd_quartz.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/video/cocoa') diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index 8549100d9..edc9c5008 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -318,6 +318,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); -- cgit v1.2.3-70-g09d2