mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Merge pull request #7 from daBrado/x11-gamma-ramp-size-workaround
Temporary fix for xf86vm gamma ramp sizes other than 256.
This commit is contained in:
commit
29c2c03346
@ -111,6 +111,15 @@ void _glfwTerminateGammaRamp(void)
|
|||||||
|
|
||||||
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
|
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
||||||
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
|
"X11/GLX: Failed to get gamma ramp due to size "
|
||||||
|
"incompatibility");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfwLibrary.X11.RandR.available &&
|
if (_glfwLibrary.X11.RandR.available &&
|
||||||
!_glfwLibrary.X11.RandR.gammaBroken)
|
!_glfwLibrary.X11.RandR.gammaBroken)
|
||||||
{
|
{
|
||||||
@ -153,6 +162,15 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
|||||||
|
|
||||||
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
|
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
|
||||||
{
|
{
|
||||||
|
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
||||||
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_PLATFORM_ERROR,
|
||||||
|
"X11/GLX: Failed to set gamma ramp due to size "
|
||||||
|
"incompatibility");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (_glfwLibrary.X11.RandR.available &&
|
if (_glfwLibrary.X11.RandR.available &&
|
||||||
!_glfwLibrary.X11.RandR.gammaBroken)
|
!_glfwLibrary.X11.RandR.gammaBroken)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user