Merge branch 'master' of github.com:elmindreda/glfw
This commit is contained in:
commit
8f3b21eb81
@ -50,8 +50,6 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
|
|||||||
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
|
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
|
||||||
|
|
||||||
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
||||||
// i.e. 256. I don't think anyone would want to change the gamma on
|
|
||||||
// Mac anyway...
|
|
||||||
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -80,8 +78,6 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
|
|||||||
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
|
CGGammaValue blue[GLFW_GAMMA_RAMP_SIZE];
|
||||||
|
|
||||||
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
// For now, don't support anything that is not GLFW_GAMMA_RAMP_SIZE
|
||||||
// i.e. 256. I don't think anyone would want to change the gamma on
|
|
||||||
// Mac anyway...
|
|
||||||
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
if (_glfwLibrary.originalRampSize != GLFW_GAMMA_RAMP_SIZE)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -93,6 +89,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
|
|||||||
green[i] = ramp->green[i] / 65535.f;
|
green[i] = ramp->green[i] / 65535.f;
|
||||||
blue[i] = ramp->blue[i] / 65535.f;
|
blue[i] = ramp->blue[i] / 65535.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGSetDisplayTransferByTable(CGMainDisplayID(), GLFW_GAMMA_RAMP_SIZE, red, green, blue);
|
CGSetDisplayTransferByTable(CGMainDisplayID(), GLFW_GAMMA_RAMP_SIZE, red, green, blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -366,7 +366,7 @@ static void updateKeyCodeLUT(void)
|
|||||||
|
|
||||||
static GLboolean initDisplay(void)
|
static GLboolean initDisplay(void)
|
||||||
{
|
{
|
||||||
_glfwLibrary.X11.display = XOpenDisplay(0);
|
_glfwLibrary.X11.display = XOpenDisplay(NULL);
|
||||||
if (!_glfwLibrary.X11.display)
|
if (!_glfwLibrary.X11.display)
|
||||||
{
|
{
|
||||||
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: Failed to open X display");
|
_glfwSetError(GLFW_OPENGL_UNAVAILABLE, "X11/GLX: Failed to open X display");
|
||||||
|
Loading…
Reference in New Issue
Block a user