Removed duplicate prefixes.

This commit is contained in:
Camilla Berglund 2010-10-13 23:05:17 +02:00
parent 215742af60
commit 6d87163aa2
5 changed files with 45 additions and 45 deletions

View File

@ -155,7 +155,7 @@ typedef struct _GLFWlibraryX11
GLboolean available;
int eventBase;
int errorBase;
} XF86VidMode;
} VidMode;
struct {
GLboolean available;
@ -164,7 +164,7 @@ typedef struct _GLFWlibraryX11
int majorVersion;
int minorVersion;
GLboolean gammaBroken;
} XRandR;
} RandR;
// Screensaver data
struct {

View File

@ -58,7 +58,7 @@ int _glfwGetClosestVideoMode(int screen, int* width, int* height, int* rate)
#endif
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
sc = XRRGetScreenInfo(_glfwLibrary.X11.display,
RootWindow(_glfwLibrary.X11.display, screen));
@ -118,8 +118,8 @@ int _glfwGetClosestVideoMode(int screen, int* width, int* height, int* rate)
#if defined(_GLFW_HAS_XF86VIDMODE)
// Use the XF86VidMode extension to control video resolution
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
// Get a list of all available display modes
XF86VidModeGetAllModeLines(_glfwLibrary.X11.display, screen,
@ -180,7 +180,7 @@ void _glfwSetVideoModeMODE(int screen, int mode, int rate)
#endif
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
root = RootWindow(_glfwLibrary.X11.display, screen);
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, root);
@ -223,8 +223,8 @@ void _glfwSetVideoModeMODE(int screen, int mode, int rate)
#if defined(_GLFW_HAS_XF86VIDMODE)
// Use the XF86VidMode extension to control video resolution
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
// Get a list of all available display modes
XF86VidModeGetAllModeLines(_glfwLibrary.X11.display, screen,
@ -283,11 +283,11 @@ void _glfwRestoreVideoMode(int screen)
if (_glfwLibrary.X11.FS.modeChanged)
{
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
XRRScreenConfiguration* sc;
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
sc = XRRGetScreenInfo(_glfwLibrary.X11.display,
_glfwLibrary.X11.root);
@ -304,8 +304,8 @@ void _glfwRestoreVideoMode(int screen)
}
#endif
#if defined(_GLFW_HAS_XF86VIDMODE)
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
// Unlock mode switch
XF86VidModeLockModeSwitch(_glfwLibrary.X11.display, screen, 0);
@ -401,7 +401,7 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
// Build resolution array
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, _glfwLibrary.X11.root);
sizelist = XRRConfigSizes(sc, &sizecount);
@ -420,8 +420,8 @@ int _glfwPlatformGetVideoModes(GLFWvidmode* list, int maxcount)
#endif
#if defined(_GLFW_HAS_XF86VIDMODE)
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
XF86VidModeGetAllModeLines(_glfwLibrary.X11.display, screen, &modecount, &modelist);
@ -504,7 +504,7 @@ void _glfwPlatformGetDesktopMode(GLFWvidmode* mode)
_glfwSplitBPP(bpp, &mode->redBits, &mode->greenBits, &mode->blueBits);
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
if (_glfwLibrary.X11.FS.modeChanged)
{
@ -515,8 +515,8 @@ void _glfwPlatformGetDesktopMode(GLFWvidmode* mode)
}
#endif
#if defined(_GLFW_HAS_XF86VIDMODE)
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
if (_glfwLibrary.X11.FS.modeChanged)
{

View File

@ -43,8 +43,8 @@
void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
{
if (_glfwLibrary.X11.XRandR.available &&
!_glfwLibrary.X11.XRandR.gammaBroken)
if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken)
{
#if defined (_GLFW_HAS_XRANDR)
size_t size = GLFW_GAMMA_RAMP_SIZE * sizeof(unsigned short);
@ -63,7 +63,7 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
XRRFreeScreenResources(rr);
}
#endif
else if (_glfwLibrary.X11.XF86VidMode.available)
else if (_glfwLibrary.X11.VidMode.available)
{
#if defined (_GLFW_HAS_XF86VIDMODE)
XF86VidModeGetGammaRamp(_glfwLibrary.X11.display,
@ -83,8 +83,8 @@ void _glfwPlatformGetGammaRamp(GLFWgammaramp* ramp)
void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
{
if (_glfwLibrary.X11.XRandR.available &&
!_glfwLibrary.X11.XRandR.gammaBroken)
if (_glfwLibrary.X11.RandR.available &&
!_glfwLibrary.X11.RandR.gammaBroken)
{
#if defined (_GLFW_HAS_XRANDR)
int i;
@ -109,7 +109,7 @@ void _glfwPlatformSetGammaRamp(const GLFWgammaramp* ramp)
XRRFreeScreenResources(rr);
}
#endif
else if (_glfwLibrary.X11.XF86VidMode.available)
else if (_glfwLibrary.X11.VidMode.available)
{
#if defined (_GLFW_HAS_XF86VIDMODE)
XF86VidModeSetGammaRamp(_glfwLibrary.X11.display,

View File

@ -84,29 +84,29 @@ static GLboolean initDisplay(void)
// Check for XF86VidMode extension
#ifdef _GLFW_HAS_XF86VIDMODE
_glfwLibrary.X11.XF86VidMode.available =
_glfwLibrary.X11.VidMode.available =
XF86VidModeQueryExtension(_glfwLibrary.X11.display,
&_glfwLibrary.X11.XF86VidMode.eventBase,
&_glfwLibrary.X11.XF86VidMode.errorBase);
&_glfwLibrary.X11.VidMode.eventBase,
&_glfwLibrary.X11.VidMode.errorBase);
#else
_glfwLibrary.X11.XF86VidMode.available = GL_FALSE;
_glfwLibrary.X11.VidMode.available = GL_FALSE;
#endif
// Check for XRandR extension
#ifdef _GLFW_HAS_XRANDR
_glfwLibrary.X11.XRandR.available =
_glfwLibrary.X11.RandR.available =
XRRQueryExtension(_glfwLibrary.X11.display,
&_glfwLibrary.X11.XRandR.eventBase,
&_glfwLibrary.X11.XRandR.errorBase);
&_glfwLibrary.X11.RandR.eventBase,
&_glfwLibrary.X11.RandR.errorBase);
if (!XRRQueryVersion(_glfwLibrary.X11.display,
&_glfwLibrary.X11.XRandR.majorVersion,
&_glfwLibrary.X11.XRandR.minorVersion))
&_glfwLibrary.X11.RandR.majorVersion,
&_glfwLibrary.X11.RandR.minorVersion))
{
fprintf(stderr, "Unable to query RandR version number\n");
}
#else
_glfwLibrary.X11.XRandR.available = GL_FALSE;
_glfwLibrary.X11.RandR.available = GL_FALSE;
#endif
// Check if GLX is supported on this display
@ -138,10 +138,10 @@ static void initGammaRamp(void)
{
#ifdef _GLFW_HAS_XRANDR
// RandR gamma support is only available with version 1.2 and above
if (_glfwLibrary.X11.XRandR.available &&
(_glfwLibrary.X11.XRandR.majorVersion > 1 ||
_glfwLibrary.X11.XRandR.majorVersion == 1 &&
_glfwLibrary.X11.XRandR.minorVersion >= 2))
if (_glfwLibrary.X11.RandR.available &&
(_glfwLibrary.X11.RandR.majorVersion > 1 ||
_glfwLibrary.X11.RandR.majorVersion == 1 &&
_glfwLibrary.X11.RandR.minorVersion >= 2))
{
// FIXME: Assumes that all monitors have the same size gamma tables
// This is reasonable as I suspect the that if they did differ, it
@ -156,7 +156,7 @@ static void initGammaRamp(void)
{
// This is probably Nvidia RandR with broken gamma support
// Flag it as useless and try Xf86VidMode below, if available
_glfwLibrary.X11.XRandR.gammaBroken = GL_TRUE;
_glfwLibrary.X11.RandR.gammaBroken = GL_TRUE;
fprintf(stderr, "Ignoring broken nVidia implementation of RandR 1.2+ gamma\n");
}
@ -165,7 +165,7 @@ static void initGammaRamp(void)
#endif
#if defined(_GLFW_HAS_XF86VIDMODE)
if (_glfwLibrary.X11.XF86VidMode.available &&
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.originalRampSize)
{
// Get the gamma size using XF86VidMode

View File

@ -1371,7 +1371,7 @@ static void processSingleEvent(void)
default:
{
#if defined(_GLFW_HAS_XRANDR)
switch (event.type - _glfwLibrary.X11.XRandR.eventBase)
switch (event.type - _glfwLibrary.X11.RandR.eventBase)
{
case RRScreenChangeNotify:
{
@ -1438,7 +1438,7 @@ int _glfwPlatformOpenWindow(_GLFWwindow* window,
{
#if defined(_GLFW_HAS_XRANDR)
// Request screen change notifications
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
XRRSelectInput(_glfwLibrary.X11.display,
window->X11.handle,
@ -1735,7 +1735,7 @@ void _glfwPlatformRefreshWindowParams(void)
// Retrieve refresh rate if possible
#if defined(_GLFW_HAS_XRANDR)
if (_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.RandR.available)
{
sc = XRRGetScreenInfo(_glfwLibrary.X11.display, _glfwLibrary.X11.root);
window->refreshRate = XRRConfigCurrentRate(sc);
@ -1743,8 +1743,8 @@ void _glfwPlatformRefreshWindowParams(void)
}
#endif
#if defined(_GLFW_HAS_XF86VIDMODE)
if (_glfwLibrary.X11.XF86VidMode.available &&
!_glfwLibrary.X11.XRandR.available)
if (_glfwLibrary.X11.VidMode.available &&
!_glfwLibrary.X11.RandR.available)
{
// Use the XF86VidMode extension to get current video mode
XF86VidModeGetModeLine(_glfwLibrary.X11.display, _glfwLibrary.X11.screen,