From 4534f5404457162c61ac86418cb696f35f068f4f Mon Sep 17 00:00:00 2001 From: rti Date: Wed, 4 Aug 2010 23:37:47 +0200 Subject: [PATCH] Fixed: #1053 using x11 color depth retrieval on mac without cocoa (removes hardcoded value) --- .../3d/driver/opengl/driver_opengl_window.cpp | 27 ++++++------------- 1 file changed, 8 insertions(+), 19 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 b54fd9083..51cb57e56 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_window.cpp @@ -1696,28 +1696,11 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode) NL3D::MAC::getCurrentScreenMode(_win, mode); -#elif defined(NL_OS_MAC) - /* - TODO this is just a hack to get the ryzom client running on mac os x x11. - the implementation below relies on the vidmode extension which is not - available on mac os x's x11. for that reason the color depth value is - hard coded here. - FIXME replace this hack by native cocoa color depth retrieval - */ - nlwarning("FIXME: returning hardcoded color depth of 24bit"); - mode.Depth= 24; - #elif defined(NL_OS_UNIX) bool found = false; int screen = DefaultScreen(_dpy); - // x11 fullscreen is not working on mac os x -#if defined(NL_OS_MAC) - mode.Windowed = true; - found = true; -#endif - #ifdef XRANDR if (!found && _xrandr_version > 0) @@ -1784,7 +1767,7 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode) } } -#endif +#endif // XF86VidMode if (!found) { @@ -1800,7 +1783,13 @@ bool CDriverGL::getCurrentScreenMode(GfxMode &mode) nldebug("Current mode: %dx%d, %d Hz, %dbit", mode.Width, mode.Height, mode.Frequency, mode.Depth); } -#endif +#if defined(NL_OS_MAC) + // x11 fullscreen is not working on mac os x + mode.Windowed = true; +#endif // NL_OS_MAC + +#endif // NL_OS_UNIX + return true; }