From e3d2c8ce981267bfe051df60413c4965ef09414a Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 21 Nov 2010 22:19:51 +0100 Subject: [PATCH] Changed: More verbose warnings messages for setScreenMode --- .../src/3d/driver/opengl/driver_opengl_window.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp index 8432273af..f45cd1408 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1356,14 +1356,21 @@ bool CDriverGL::setScreenMode(const GfxMode &mode) } } - if (size > -1 && XRRSetScreenConfig(_dpy, screen_config, root, size, saved_rotation, CurrentTime) == RRSetConfigSuccess) + if (size > -1) { - nlinfo("3D: Switching to XRandR mode %d: %dx%d", size, sizes[size].width, sizes[size].height); - found = true; + if (XRRSetScreenConfig(_dpy, screen_config, root, size, saved_rotation, CurrentTime) == RRSetConfigSuccess)) + { + nlinfo("3D: Switching to XRandR mode %d: %dx%d", size, sizes[size].width, sizes[size].height); + found = true; + } + else + { + nlwarning("3D: XRRSetScreenConfig failed for mode %d: %dx%d", size, sizes[size].width, sizes[size].height); + } } else { - nlwarning("3D: No corresponding screen mode or XRRSetScreenConfig failed"); + nlwarning("3D: No corresponding screen mode"); } XRRFreeScreenConfigInfo(screen_config);