mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Formatting.
This commit is contained in:
parent
855b386e46
commit
4cb5fa0ba8
@ -31,9 +31,9 @@
|
||||
#include "internal.h"
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Enable system keys
|
||||
|
@ -34,15 +34,11 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** GLFW internal functions ****
|
||||
//************************************************************************
|
||||
|
||||
//========================================================================
|
||||
// Convert BPP to RGB bits (based on "best guess")
|
||||
//========================================================================
|
||||
|
||||
static void BPP2RGB(int bpp, int* r, int* g, int* b)
|
||||
static void bpp2rgb(int bpp, int* r, int* g, int* b)
|
||||
{
|
||||
int delta;
|
||||
|
||||
@ -61,6 +57,10 @@ static void BPP2RGB(int bpp, int* r, int* g, int* b)
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Finds the video mode closest in size to the specified desired size
|
||||
//========================================================================
|
||||
@ -331,10 +331,9 @@ void _glfwRestoreVideoMode(int screen)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct _glfwResolution
|
||||
{
|
||||
@ -392,7 +391,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
|
||||
depth = vislist[k].depth;
|
||||
|
||||
// Convert to RGB
|
||||
BPP2RGB(depth, &r, &g, &b);
|
||||
bpp2rgb(depth, &r, &g, &b);
|
||||
depth = (r << 16) | (g << 8) | b;
|
||||
|
||||
// Is this mode unique?
|
||||
@ -467,8 +466,8 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
|
||||
rescount = 1;
|
||||
resarray = (struct _glfwResolution*) malloc(sizeof(struct _glfwResolution) * rescount);
|
||||
|
||||
resarray[ 0 ].width = DisplayWidth(dpy, screen);
|
||||
resarray[ 0 ].height = DisplayHeight(dpy, screen);
|
||||
resarray[0].width = DisplayWidth(dpy, screen);
|
||||
resarray[0].height = DisplayHeight(dpy, screen);
|
||||
}
|
||||
|
||||
// Build permutations of colors and resolutions
|
||||
@ -517,7 +516,7 @@ void _glfwPlatformGetDesktopMode(GLFWvidmode* mode)
|
||||
bpp = DefaultDepth(dpy, screen);
|
||||
|
||||
// Convert BPP to RGB bits
|
||||
BPP2RGB(bpp, &mode->redBits, &mode->greenBits, &mode->blueBits);
|
||||
bpp2rgb(bpp, &mode->redBits, &mode->greenBits, &mode->blueBits);
|
||||
|
||||
#if defined(_GLFW_HAS_XRANDR)
|
||||
if (_glfwLibrary.X11.XRandR.available)
|
||||
|
@ -52,9 +52,9 @@ void (*glXGetProcAddressEXT(const GLubyte* procName))();
|
||||
#endif
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Check if an OpenGL extension is available at runtime
|
||||
@ -65,7 +65,6 @@ int _glfwPlatformExtensionSupported(const char* extension)
|
||||
const GLubyte* extensions;
|
||||
|
||||
// Get list of GLX extensions
|
||||
// Yuck
|
||||
extensions = (const GLubyte*) glXQueryExtensionsString(_glfwLibrary.X11.display,
|
||||
_glfwLibrary.X11.screen);
|
||||
if (extensions != NULL)
|
||||
|
@ -33,10 +33,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** GLFW internal functions ****
|
||||
//************************************************************************
|
||||
|
||||
//========================================================================
|
||||
// Dynamically load libraries
|
||||
//========================================================================
|
||||
@ -183,9 +179,9 @@ static void terminateDisplay(void)
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Initialize various GLFW state
|
||||
@ -244,6 +240,7 @@ int _glfwPlatformTerminate(void)
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
|
||||
//========================================================================
|
||||
// Get the GLFW version string
|
||||
//========================================================================
|
||||
|
@ -37,10 +37,6 @@
|
||||
//========================================================================
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** GLFW internal functions ****
|
||||
//************************************************************************
|
||||
|
||||
#ifdef _GLFW_USE_LINUX_JOYSTICKS
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@ -73,6 +69,10 @@ struct js_event {
|
||||
#endif // _GLFW_USE_LINUX_JOYSTICKS
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Initialize joystick interface
|
||||
//========================================================================
|
||||
@ -255,9 +255,9 @@ static void pollJoystickEvents(void)
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Determine joystick capabilities
|
||||
|
@ -49,9 +49,9 @@ void _glfwInitTimer(void)
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Return timer value in seconds
|
||||
|
@ -50,9 +50,9 @@
|
||||
#define _NET_WM_STATE_TOGGLE 2
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** GLFW internal functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW internal API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Checks whether the event is a MapNotify for the specified window
|
||||
@ -1366,10 +1366,9 @@ static void processSingleEvent(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
//************************************************************************
|
||||
//**** Platform implementation functions ****
|
||||
//************************************************************************
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////// GLFW platform API //////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//========================================================================
|
||||
// Here is where the window is created, and
|
||||
|
Loading…
Reference in New Issue
Block a user