mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-26 20:28:49 -05:00
Formatting.
This commit is contained in:
parent
34ce04a122
commit
8dde39b3e0
|
@ -122,14 +122,9 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
////// GLFW internal API //////
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
// Starts reservation for display fading
|
// Starts reservation for display fading
|
||||||
//
|
//
|
||||||
CGDisplayFadeReservationToken _glfwBeginFadeReservation(void)
|
static CGDisplayFadeReservationToken beginFadeReservation(void)
|
||||||
{
|
{
|
||||||
CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken;
|
CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken;
|
||||||
|
|
||||||
|
@ -141,7 +136,7 @@ CGDisplayFadeReservationToken _glfwBeginFadeReservation(void)
|
||||||
|
|
||||||
// Ends reservation for display fading
|
// Ends reservation for display fading
|
||||||
//
|
//
|
||||||
void _glfwEndFadeReservation(CGDisplayFadeReservationToken token)
|
static void endFadeReservation(CGDisplayFadeReservationToken token)
|
||||||
{
|
{
|
||||||
if (token != kCGDisplayFadeReservationInvalidToken)
|
if (token != kCGDisplayFadeReservationInvalidToken)
|
||||||
{
|
{
|
||||||
|
@ -150,6 +145,11 @@ void _glfwEndFadeReservation(CGDisplayFadeReservationToken token)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
////// GLFW internal API //////
|
||||||
|
//////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Change the current video mode
|
// Change the current video mode
|
||||||
//
|
//
|
||||||
GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, int* width, int* height, int* bpp)
|
GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, int* width, int* height, int* bpp)
|
||||||
|
@ -205,12 +205,12 @@ GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, int* width, int* height, int*
|
||||||
|
|
||||||
monitor->ns.previousMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);
|
monitor->ns.previousMode = CGDisplayCopyDisplayMode(monitor->ns.displayID);
|
||||||
|
|
||||||
CGDisplayFadeReservationToken token = _glfwBeginFadeReservation();
|
CGDisplayFadeReservationToken token = beginFadeReservation();
|
||||||
|
|
||||||
CGDisplayCapture(monitor->ns.displayID);
|
CGDisplayCapture(monitor->ns.displayID);
|
||||||
CGDisplaySetDisplayMode(monitor->ns.displayID, bestMode, NULL);
|
CGDisplaySetDisplayMode(monitor->ns.displayID, bestMode, NULL);
|
||||||
|
|
||||||
_glfwEndFadeReservation(token);
|
endFadeReservation(token);
|
||||||
|
|
||||||
CFRelease(modes);
|
CFRelease(modes);
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
@ -220,12 +220,12 @@ GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, int* width, int* height, int*
|
||||||
//
|
//
|
||||||
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
|
||||||
{
|
{
|
||||||
CGDisplayFadeReservationToken token = _glfwBeginFadeReservation();
|
CGDisplayFadeReservationToken token = beginFadeReservation();
|
||||||
|
|
||||||
CGDisplaySetDisplayMode(monitor->ns.displayID, monitor->ns.previousMode, NULL);
|
CGDisplaySetDisplayMode(monitor->ns.displayID, monitor->ns.previousMode, NULL);
|
||||||
CGDisplayRelease(monitor->ns.displayID);
|
CGDisplayRelease(monitor->ns.displayID);
|
||||||
|
|
||||||
_glfwEndFadeReservation(token);
|
endFadeReservation(token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user