From 046bebb3050ff0f09b178e405cbbf9505ba148ba Mon Sep 17 00:00:00 2001 From: "John F. Fay" Date: Thu, 17 Mar 2011 04:21:38 +0000 Subject: [PATCH] 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 --- src/freeglut_gamemode.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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; -- 1.7.10.4