mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Formatting.
This commit is contained in:
parent
34ce04a122
commit
8dde39b3e0
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user