Fix #8066: Try another fallback colourspace if first one fails

This commit is contained in:
Niels Martin Hansen 2020-06-01 19:26:23 +02:00 committed by Charles Pigott
parent dd4aae830d
commit 02980119e4
1 changed files with 2 additions and 0 deletions

View File

@ -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);