mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
macOS: fix colors appearing oversaturated on P3 displays.
The fix only applies to macOS 11+ when using OpenGL.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user