xf86VidMode error checking (Andrew Lentvorski)

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@112 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
brianp 2003-07-01 20:17:05 +00:00
parent 8cce55439e
commit 69cbc334a9

View File

@ -62,6 +62,7 @@ void fghRememberState( void )
/*
* Query the current display settings:
*/
fgDisplay.DisplayModeValid =
XF86VidModeGetModeLine(
fgDisplay.Display,
fgDisplay.Screen,
@ -69,6 +70,9 @@ void fghRememberState( void )
&fgDisplay.DisplayMode
);
if (!fgDisplay.DisplayModeValid)
fgWarning( "Runtime use of XF86VidModeGetModeLine failed.\n" );
# else
# warning fghRememberState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
# endif
@ -106,6 +110,8 @@ void fghRestoreState( void )
*/
# ifdef X_XF86VidModeGetAllModeLines
if (fgDisplay.DisplayModeValid)
{
XF86VidModeModeInfo** displayModes;
int i, displayModesCount;
@ -149,6 +155,7 @@ void fghRestoreState( void )
return;
}
}
}
# else
# warning fghRestoreState: missing XFree86 video mode extensions, game mode will not change screen resolution when activated
@ -188,6 +195,8 @@ GLboolean fghChangeDisplayMode( GLboolean haveToTest )
*/
# ifdef X_XF86VidModeGetAllModeLines
if (fgDisplay.DisplayModeValid)
{
XF86VidModeModeInfo** displayModes;
int i, displayModesCount;
@ -236,6 +245,7 @@ GLboolean fghChangeDisplayMode( GLboolean haveToTest )
return( TRUE );
}
}
}
/*
* Something must have went wrong