From: John F. Fay Date: Thu, 17 Mar 2011 04:21:38 +0000 (+0000) Subject: Adding a warning to an unsuccessful game mode entry per e-mail from Diedrick Niehorst... X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=commitdiff_plain;h=046bebb3050ff0f09b178e405cbbf9505ba148ba;p=freeglut 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: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@903 7f0cb862-5218-0410-a997-914c9d46530a --- diff --git a/src/freeglut_gamemode.c b/src/freeglut_gamemode.c index 2425ac4..6934534 100644 --- a/src/freeglut_gamemode.c +++ b/src/freeglut_gamemode.c @@ -445,6 +445,7 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest ) DEVMODE devMode; char *fggmstr = NULL; + char displayMode[300]; success = GL_FALSE; @@ -508,8 +509,14 @@ static GLboolean fghChangeDisplayMode( GLboolean haveToTest ) } if ( !success ) - fgWarning(fggmstr); /* 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 ;) */ + { + /* 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 ;) */ + + /* 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 return success;