mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
Fix #8066: Try another fallback colourspace if first one fails
This commit is contained in:
parent
b3ddf2c907
commit
764497206a
@ -318,6 +318,8 @@ bool WindowQuartzSubdriver::SetVideoMode(int width, int height, int bpp)
|
|||||||
|
|
||||||
[this->window setColorSpace:[NSColorSpace sRGBColorSpace]];
|
[this->window setColorSpace:[NSColorSpace sRGBColorSpace]];
|
||||||
this->color_space = CGColorSpaceCreateWithName(kCGColorSpaceSRGB);
|
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();
|
bool ret = WindowResized();
|
||||||
this->UpdatePalette(0, 256);
|
this->UpdatePalette(0, 256);
|
||||||
|
Loading…
Reference in New Issue
Block a user