diff --git a/lib/carbon/carbon_fullscreen.c b/lib/carbon/carbon_fullscreen.c index db221cd5..0cf31fe4 100644 --- a/lib/carbon/carbon_fullscreen.c +++ b/lib/carbon/carbon_fullscreen.c @@ -32,27 +32,27 @@ #include "internal.h" //======================================================================== -// _glfwVideoModesEqual() - Compares two video modes +// Compares two video modes //======================================================================== static int _glfwVideoModesEqual( GLFWvidmode* first, GLFWvidmode* second ) { if( first->Width != second->Width ) - return 0; - + return 0; + if( first->Height != second->Height ) - return 0; - + return 0; + if( first->RedBits + first->GreenBits + first->BlueBits != second->RedBits + second->GreenBits + second->BlueBits ) - return 0; - + return 0; + return 1; } - + //======================================================================== -// _glfwCGToGLFWVideoMode() - Converts a CG mode to a GLFW mode +// Converts a CG mode to a GLFW mode //======================================================================== static void _glfwCGToGLFWVideoMode( CFDictionaryRef cgMode, @@ -77,7 +77,7 @@ static void _glfwCGToGLFWVideoMode( CFDictionaryRef cgMode, } //======================================================================== -// _glfwPlatformGetVideoModes() - Get a list of available video modes +// Get a list of available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) @@ -98,26 +98,28 @@ int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) &mode ); // Is it a valid mode? (only list depths >= 15 bpp) - if( mode.RedBits + mode.GreenBits + mode.BlueBits < 15 ) - continue; - + if( mode.RedBits + mode.GreenBits + mode.BlueBits < 15 ) + continue; + // Check for duplicate of current mode in target list - for( j = 0; j < numModes; ++j ) - { - if( _glfwVideoModesEqual( &mode, &(list[j]) ) ) - break; - } - - // If empty list or no match found - if( numModes == 0 || j == numModes ) - list[numModes++] = mode; + for( j = 0; j < numModes; ++j ) + { + if( _glfwVideoModesEqual( &mode, &(list[j]) ) ) + break; + } + + // If empty list or no match found + if( numModes == 0 || j == numModes ) + { + list[numModes++] = mode; + } } return numModes; } //======================================================================== -// glfwGetDesktopMode() - Get the desktop video mode +// Get the desktop video mode //======================================================================== void _glfwPlatformGetDesktopMode( GLFWvidmode *mode ) diff --git a/lib/fullscreen.c b/lib/fullscreen.c index c4e1a631..f5693914 100644 --- a/lib/fullscreen.c +++ b/lib/fullscreen.c @@ -36,7 +36,7 @@ //************************************************************************ //======================================================================== -// glfwGetVideoModes() - Get a list of available video modes +// Get a list of available video modes //======================================================================== GLFWAPI int glfwGetVideoModes( GLFWvidmode *list, int maxcount ) @@ -79,7 +79,7 @@ GLFWAPI int glfwGetVideoModes( GLFWvidmode *list, int maxcount ) //======================================================================== -// glfwGetDesktopMode() - Get the desktop video mode +// Get the desktop video mode //======================================================================== GLFWAPI void glfwGetDesktopMode( GLFWvidmode *mode ) diff --git a/lib/glext.c b/lib/glext.c index c088dbe0..e16aaefb 100644 --- a/lib/glext.c +++ b/lib/glext.c @@ -86,8 +86,7 @@ void _glfwParseGLVersion( int *major, int *minor, int *rev ) } //======================================================================== -// _glfwStringInExtensionString() - Check if a string can be found in an -// OpenGL extension string +// Check if a string can be found in an OpenGL extension string //======================================================================== int _glfwStringInExtensionString( const char *string, @@ -191,7 +190,7 @@ GLFWAPI int glfwExtensionSupported( const char *extension ) //======================================================================== -// glfwGetProcAddress() - Get the function pointer to an OpenGL function. +// Get the function pointer to an OpenGL function. // This function can be used to get access to extended OpenGL functions. //======================================================================== diff --git a/lib/input.c b/lib/input.c index 702995be..323b77da 100644 --- a/lib/input.c +++ b/lib/input.c @@ -32,7 +32,7 @@ //======================================================================== -// glfwGetKey() +// //======================================================================== GLFWAPI int glfwGetKey( int key ) @@ -61,7 +61,7 @@ GLFWAPI int glfwGetKey( int key ) //======================================================================== -// glfwGetMouseButton() +// //======================================================================== GLFWAPI int glfwGetMouseButton( int button ) @@ -90,7 +90,7 @@ GLFWAPI int glfwGetMouseButton( int button ) //======================================================================== -// glfwGetMousePos() +// //======================================================================== GLFWAPI void glfwGetMousePos( int *xpos, int *ypos ) @@ -114,7 +114,7 @@ GLFWAPI void glfwGetMousePos( int *xpos, int *ypos ) //======================================================================== -// glfwSetMousePos() +// //======================================================================== GLFWAPI void glfwSetMousePos( int xpos, int ypos ) @@ -147,7 +147,7 @@ GLFWAPI void glfwSetMousePos( int xpos, int ypos ) //======================================================================== -// glfwGetMouseWheel() +// //======================================================================== GLFWAPI int glfwGetMouseWheel( void ) @@ -164,7 +164,7 @@ GLFWAPI int glfwGetMouseWheel( void ) //======================================================================== -// glfwSetMouseWheel() +// //======================================================================== GLFWAPI void glfwSetMouseWheel( int pos ) @@ -181,7 +181,7 @@ GLFWAPI void glfwSetMouseWheel( int pos ) //======================================================================== -// glfwSetKeyCallback() - Set callback function for keyboard input +// Set callback function for keyboard input //======================================================================== GLFWAPI void glfwSetKeyCallback( GLFWkeyfun cbfun ) @@ -198,7 +198,7 @@ GLFWAPI void glfwSetKeyCallback( GLFWkeyfun cbfun ) //======================================================================== -// glfwSetCharCallback() - Set callback function for character input +// Set callback function for character input //======================================================================== GLFWAPI void glfwSetCharCallback( GLFWcharfun cbfun ) @@ -215,7 +215,7 @@ GLFWAPI void glfwSetCharCallback( GLFWcharfun cbfun ) //======================================================================== -// glfwSetMouseButtonCallback() - Set callback function for mouse clicks +// Set callback function for mouse clicks //======================================================================== GLFWAPI void glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ) @@ -232,7 +232,7 @@ GLFWAPI void glfwSetMouseButtonCallback( GLFWmousebuttonfun cbfun ) //======================================================================== -// glfwSetMousePosCallback() - Set callback function for mouse moves +// Set callback function for mouse moves //======================================================================== GLFWAPI void glfwSetMousePosCallback( GLFWmouseposfun cbfun ) @@ -256,7 +256,7 @@ GLFWAPI void glfwSetMousePosCallback( GLFWmouseposfun cbfun ) //======================================================================== -// glfwSetMouseWheelCallback() - Set callback function for mouse wheel +// Set callback function for mouse wheel //======================================================================== GLFWAPI void glfwSetMouseWheelCallback( GLFWmousewheelfun cbfun ) diff --git a/lib/joystick.c b/lib/joystick.c index 393f073d..4fb44eec 100644 --- a/lib/joystick.c +++ b/lib/joystick.c @@ -36,7 +36,7 @@ //************************************************************************ //======================================================================== -// glfwGetJoystickParam() - Determine joystick capabilities +// Determine joystick capabilities //======================================================================== GLFWAPI int glfwGetJoystickParam( int joy, int param ) @@ -52,7 +52,7 @@ GLFWAPI int glfwGetJoystickParam( int joy, int param ) //======================================================================== -// glfwGetJoystickPos() - Get joystick axis positions +// Get joystick axis positions //======================================================================== GLFWAPI int glfwGetJoystickPos( int joy, float *pos, int numaxes ) @@ -76,7 +76,7 @@ GLFWAPI int glfwGetJoystickPos( int joy, float *pos, int numaxes ) //======================================================================== -// glfwGetJoystickButtons() - Get joystick button states +// Get joystick button states //======================================================================== GLFWAPI int glfwGetJoystickButtons( int joy, diff --git a/lib/time.c b/lib/time.c index fb459bcb..5228b268 100644 --- a/lib/time.c +++ b/lib/time.c @@ -36,7 +36,7 @@ //************************************************************************ //======================================================================== -// glfwGetTime() - Return timer value in seconds +// Return timer value in seconds //======================================================================== GLFWAPI double glfwGetTime( void ) @@ -52,7 +52,7 @@ GLFWAPI double glfwGetTime( void ) //======================================================================== -// glfwSetTime() - Set timer value in seconds +// Set timer value in seconds //======================================================================== GLFWAPI void glfwSetTime( double time ) diff --git a/lib/win32/win32_fullscreen.c b/lib/win32/win32_fullscreen.c index b5523842..8af93f39 100644 --- a/lib/win32/win32_fullscreen.c +++ b/lib/win32/win32_fullscreen.c @@ -206,7 +206,7 @@ void _glfwSetVideoModeMODE( int mode ) //======================================================================== -// _glfwSetVideoMode() - Change the current video mode +// Change the current video mode //======================================================================== void _glfwSetVideoMode( int *w, int *h, int r, int g, int b, int refresh ) @@ -226,7 +226,7 @@ void _glfwSetVideoMode( int *w, int *h, int r, int g, int b, int refresh ) //************************************************************************ //======================================================================== -// _glfwPlatformGetVideoModes() - Get a list of available video modes +// Get a list of available video modes //======================================================================== int _glfwPlatformGetVideoModes( GLFWvidmode *list, int maxcount ) diff --git a/lib/win32/win32_init.c b/lib/win32/win32_init.c index 0610d44f..60629458 100644 --- a/lib/win32/win32_init.c +++ b/lib/win32/win32_init.c @@ -42,7 +42,7 @@ //************************************************************************ //======================================================================== -// _glfwInitLibraries() - Load necessary libraries (DLLs) +// Load necessary libraries (DLLs) //======================================================================== static int _glfwInitLibraries( void ) @@ -113,7 +113,7 @@ static int _glfwInitLibraries( void ) //======================================================================== -// _glfwFreeLibraries() - Unload used libraries (DLLs) +// Unload used libraries (DLLs) //======================================================================== static void _glfwFreeLibraries( void ) @@ -139,7 +139,7 @@ static void _glfwFreeLibraries( void ) //======================================================================== -// _glfwTerminate_atexit() - Terminate GLFW when exiting application +// Terminate GLFW when exiting application //======================================================================== void _glfwTerminate_atexit( void ) @@ -154,7 +154,7 @@ void _glfwTerminate_atexit( void ) //************************************************************************ //======================================================================== -// _glfwPlatformInit() - Initialize various GLFW state +// Initialize various GLFW state //======================================================================== int _glfwPlatformInit( void ) diff --git a/lib/win32/win32_joystick.c b/lib/win32/win32_joystick.c index cc37dcd5..d30469e0 100644 --- a/lib/win32/win32_joystick.c +++ b/lib/win32/win32_joystick.c @@ -36,8 +36,7 @@ //************************************************************************ //======================================================================== -// _glfwJoystickPresent() - Return GL_TRUE if joystick is present, -// else return GL_FALSE. +// Return GL_TRUE if joystick is present, else return GL_FALSE. //======================================================================== static int _glfwJoystickPresent( int joy ) @@ -68,7 +67,7 @@ static int _glfwJoystickPresent( int joy ) //======================================================================== -// _glfwCalcJoystickPos() - Calculate joystick position +// Calculate joystick position //======================================================================== static float _glfwCalcJoystickPos( DWORD pos, DWORD min, DWORD max ) @@ -86,7 +85,7 @@ static float _glfwCalcJoystickPos( DWORD pos, DWORD min, DWORD max ) //************************************************************************ //======================================================================== -// _glfwPlatformGetJoystickParam() - Determine joystick capabilities +// Determine joystick capabilities //======================================================================== int _glfwPlatformGetJoystickParam( int joy, int param ) @@ -129,7 +128,7 @@ int _glfwPlatformGetJoystickParam( int joy, int param ) //======================================================================== -// _glfwPlatformGetJoystickPos() - Get joystick axis positions +// Get joystick axis positions //======================================================================== int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) @@ -194,7 +193,7 @@ int _glfwPlatformGetJoystickPos( int joy, float *pos, int numaxes ) //======================================================================== -// _glfwPlatformGetJoystickButtons() - Get joystick button states +// Get joystick button states //======================================================================== int _glfwPlatformGetJoystickButtons( int joy, unsigned char *buttons, diff --git a/lib/win32/win32_time.c b/lib/win32/win32_time.c index ffa46d44..7c52f011 100644 --- a/lib/win32/win32_time.c +++ b/lib/win32/win32_time.c @@ -36,7 +36,7 @@ //************************************************************************ //======================================================================== -// _glfwInitTimer() - Initialise timer +// Initialise timer //======================================================================== void _glfwInitTimer( void ) diff --git a/lib/window.c b/lib/window.c index 1695b074..39066cdf 100644 --- a/lib/window.c +++ b/lib/window.c @@ -83,7 +83,7 @@ void _glfwInputDeactivation( void ) //======================================================================== -// _glfwClearInput() - Clear all input state +// Clear all input state //======================================================================== void _glfwClearInput( void ) @@ -122,7 +122,7 @@ void _glfwClearInput( void ) //======================================================================== -// _glfwInputKey() - Register keyboard activity +// Register keyboard activity //======================================================================== void _glfwInputKey( int key, int action ) @@ -216,7 +216,7 @@ void _glfwInputChar( int character, int action ) //======================================================================== -// _glfwInputMouseClick() - Register mouse button clicks +// Register mouse button clicks //======================================================================== void _glfwInputMouseClick( int button, int action ) @@ -698,7 +698,7 @@ GLFWAPI void glfwCloseWindow( void ) //======================================================================== -// glfwSetWindowTitle() - Set the window title +// Set the window title //======================================================================== GLFWAPI void glfwSetWindowTitle( const char *title ) @@ -715,7 +715,7 @@ GLFWAPI void glfwSetWindowTitle( const char *title ) //======================================================================== -// glfwGetWindowSize() - Get the window size +// Get the window size //======================================================================== GLFWAPI void glfwGetWindowSize( int *width, int *height ) @@ -732,7 +732,7 @@ GLFWAPI void glfwGetWindowSize( int *width, int *height ) //======================================================================== -// glfwSetWindowSize() - Set the window size +// Set the window size //======================================================================== GLFWAPI void glfwSetWindowSize( int width, int height ) @@ -759,7 +759,7 @@ GLFWAPI void glfwSetWindowSize( int width, int height ) //======================================================================== -// glfwSetWindowPos() - Set the window position +// Set the window position //======================================================================== GLFWAPI void glfwSetWindowPos( int x, int y ) @@ -777,7 +777,7 @@ GLFWAPI void glfwSetWindowPos( int x, int y ) //======================================================================== -// glfwIconfyWindow() - Window iconification +// Window iconification //======================================================================== GLFWAPI void glfwIconifyWindow( void ) @@ -794,7 +794,7 @@ GLFWAPI void glfwIconifyWindow( void ) //======================================================================== -// glfwRestoreWindow() - Window un-iconification +// Window un-iconification //======================================================================== GLFWAPI void glfwRestoreWindow( void ) @@ -840,7 +840,7 @@ GLFWAPI void glfwSwapBuffers( void ) //======================================================================== -// glfwSwapInterval() - Set double buffering swap interval (0 = vsync off) +// Set double buffering swap interval (0 = vsync off) //======================================================================== GLFWAPI void glfwSwapInterval( int interval ) @@ -857,7 +857,7 @@ GLFWAPI void glfwSwapInterval( int interval ) //======================================================================== -// glfwGetWindowParam() - Get window parameter +// Get window parameter //======================================================================== GLFWAPI int glfwGetWindowParam( int param ) @@ -936,8 +936,7 @@ GLFWAPI int glfwGetWindowParam( int param ) //======================================================================== -// glfwSetWindowSizeCallback() - Set callback function for window size -// changes +// Set callback function for window size changes //======================================================================== GLFWAPI void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ) @@ -960,8 +959,7 @@ GLFWAPI void glfwSetWindowSizeCallback( GLFWwindowsizefun cbfun ) } //======================================================================== -// glfwSetWindowCloseCallback() - Set callback function for window close -// events +// Set callback function for window close events //======================================================================== GLFWAPI void glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ) @@ -978,8 +976,7 @@ GLFWAPI void glfwSetWindowCloseCallback( GLFWwindowclosefun cbfun ) //======================================================================== -// glfwSetWindowRefreshCallback() - Set callback function for window -// refresh events +// Set callback function for window refresh events //======================================================================== GLFWAPI void glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ) @@ -996,7 +993,7 @@ GLFWAPI void glfwSetWindowRefreshCallback( GLFWwindowrefreshfun cbfun ) //======================================================================== -// glfwPollEvents() - Poll for new window and input events +// Poll for new window and input events //======================================================================== GLFWAPI void glfwPollEvents( void ) @@ -1013,7 +1010,7 @@ GLFWAPI void glfwPollEvents( void ) //======================================================================== -// glfwWaitEvents() - Wait for new window and input events +// Wait for new window and input events //======================================================================== GLFWAPI void glfwWaitEvents( void )