Formatting.

This commit is contained in:
Camilla Berglund 2013-02-24 21:14:44 +01:00
parent 34ce04a122
commit 8dde39b3e0

View File

@ -122,14 +122,9 @@ static GLFWvidmode vidmodeFromCGDisplayMode(CGDisplayModeRef mode)
return result;
}
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
// Starts reservation for display fading
//
CGDisplayFadeReservationToken _glfwBeginFadeReservation(void)
static CGDisplayFadeReservationToken beginFadeReservation(void)
{
CGDisplayFadeReservationToken token = kCGDisplayFadeReservationInvalidToken;
@ -141,7 +136,7 @@ CGDisplayFadeReservationToken _glfwBeginFadeReservation(void)
// Ends reservation for display fading
//
void _glfwEndFadeReservation(CGDisplayFadeReservationToken token)
static void endFadeReservation(CGDisplayFadeReservationToken token)
{
if (token != kCGDisplayFadeReservationInvalidToken)
{
@ -150,6 +145,11 @@ void _glfwEndFadeReservation(CGDisplayFadeReservationToken token)
}
}
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
// Change the current video mode
//
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);
CGDisplayFadeReservationToken token = _glfwBeginFadeReservation();
CGDisplayFadeReservationToken token = beginFadeReservation();
CGDisplayCapture(monitor->ns.displayID);
CGDisplaySetDisplayMode(monitor->ns.displayID, bestMode, NULL);
_glfwEndFadeReservation(token);
endFadeReservation(token);
CFRelease(modes);
return GL_TRUE;
@ -220,12 +220,12 @@ GLboolean _glfwSetVideoMode(_GLFWmonitor* monitor, int* width, int* height, int*
//
void _glfwRestoreVideoMode(_GLFWmonitor* monitor)
{
CGDisplayFadeReservationToken token = _glfwBeginFadeReservation();
CGDisplayFadeReservationToken token = beginFadeReservation();
CGDisplaySetDisplayMode(monitor->ns.displayID, monitor->ns.previousMode, NULL);
CGDisplayRelease(monitor->ns.displayID);
_glfwEndFadeReservation(token);
endFadeReservation(token);
}