Skip to content

Commit

Permalink
Fix OpenTTD#8066: Try another fallback colourspace if first one fails
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsmh committed Jun 1, 2020
1 parent b3ddf2c commit 5f021bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/cocoa/wnd_quartz.mm
Expand Up @@ -318,6 +318,8 @@ - (void)drawRect:(NSRect)invalidRect

[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);
Expand Down

0 comments on commit 5f021bc

Please sign in to comment.