macOS: fix colors appearing oversaturated on P3 displays.

The fix only applies to macOS 11+ when using OpenGL.
This commit is contained in:
slime
2022-09-30 15:17:46 -03:00
parent 60036d5dfe
commit 6173c1638d
4 changed files with 49 additions and 28 deletions
+8
View File
@@ -26,6 +26,8 @@
#include <string>
typedef struct SDL_Window SDL_Window;
namespace love
{
namespace macos
@@ -55,6 +57,12 @@ void requestAttention(bool continuous);
void setMetalLayerVSync(void *metallayer, bool vsync);
bool getMetalLayerVSync(void *metallayer);
/**
* Explicitly sets the window's color space to be sRGB - which stops the OS
* from interpreting the backbuffer output as P3 on P3-capable displays.
**/
void setWindowSRGBColorSpace(SDL_Window *window);
} // macos
} // love