Adding a warning to an unsuccessful game mode entry per e-mail from Diedrick Niehorster dated 3/16/11 11:06 PM.

git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@903 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
fayjf 2011-03-17 04:21:38 +00:00
parent 59cf65ed21
commit b5bed65086

View File

@ -445,6 +445,7 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest )
DEVMODE devMode; DEVMODE devMode;
char *fggmstr = NULL; char *fggmstr = NULL;
char displayMode[300];
success = GL_FALSE; success = GL_FALSE;
@ -508,8 +509,14 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest )
} }
if ( !success ) if ( !success )
fgWarning(fggmstr); /* I'd rather get info whats going on in my program than wonder about */ {
/* I'd rather get info whats going on in my program than wonder about */
/* magic happenings behind my back, its lib for devels at last ;) */ /* magic happenings behind my back, its lib for devels at last ;) */
/* append display mode to error to make things more informative */
sprintf(displayMode,"%s Problem with requested mode: %ix%i:%i@%i", fggmstr, devMode.dmPelsWidth, devMode.dmPelsHeight, devMode.dmBitsPerPel, devMode.dmDisplayFrequency);
fgWarning(displayMode);
}
#endif #endif
return success; return success;