mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 10:48:51 -05:00
Moved X11 gamma ramp termination to gamma module.
This commit is contained in:
parent
20fccd4aa3
commit
322407ae9f
|
@ -90,6 +90,17 @@ void _glfwInitGammaRamp(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//========================================================================
|
||||||
|
// Restore original gamma ramp if necessary
|
||||||
|
//========================================================================
|
||||||
|
|
||||||
|
void _glfwTerminateGammaRamp(void)
|
||||||
|
{
|
||||||
|
if (_glfwLibrary.originalRampSize && _glfwLibrary.rampChanged)
|
||||||
|
_glfwPlatformSetGammaRamp(&_glfwLibrary.originalRamp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
////// GLFW platform API //////
|
////// GLFW platform API //////
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -659,9 +659,6 @@ static Cursor createNULLCursor(void)
|
||||||
|
|
||||||
static void terminateDisplay(void)
|
static void terminateDisplay(void)
|
||||||
{
|
{
|
||||||
if (_glfwLibrary.originalRampSize && _glfwLibrary.rampChanged)
|
|
||||||
_glfwPlatformSetGammaRamp(&_glfwLibrary.originalRamp);
|
|
||||||
|
|
||||||
if (_glfwLibrary.X11.display)
|
if (_glfwLibrary.X11.display)
|
||||||
{
|
{
|
||||||
XCloseDisplay(_glfwLibrary.X11.display);
|
XCloseDisplay(_glfwLibrary.X11.display);
|
||||||
|
@ -713,6 +710,8 @@ int _glfwPlatformTerminate(void)
|
||||||
_glfwLibrary.X11.cursor = (Cursor) 0;
|
_glfwLibrary.X11.cursor = (Cursor) 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_glfwTerminateGammaRamp();
|
||||||
|
|
||||||
terminateDisplay();
|
terminateDisplay();
|
||||||
|
|
||||||
_glfwTerminateJoysticks();
|
_glfwTerminateJoysticks();
|
||||||
|
|
|
@ -285,6 +285,7 @@ void _glfwInitTimer(void);
|
||||||
|
|
||||||
// Gamma
|
// Gamma
|
||||||
void _glfwInitGammaRamp(void);
|
void _glfwInitGammaRamp(void);
|
||||||
|
void _glfwTerminateGammaRamp(void);
|
||||||
|
|
||||||
// Fullscreen support
|
// Fullscreen support
|
||||||
int _glfwGetClosestVideoMode(int* width, int* height, int* rate);
|
int _glfwGetClosestVideoMode(int* width, int* height, int* rate);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user