From 33611232f347e52484415fe07d4c79ff8690f80e Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 3 Jul 2004 12:06:25 +0000 Subject: [PATCH] Linux fix fallback --- src/native/linux/org_lwjgl_opengl_Display.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/native/linux/org_lwjgl_opengl_Display.cpp b/src/native/linux/org_lwjgl_opengl_Display.cpp index 94991b6d..285f4073 100644 --- a/src/native/linux/org_lwjgl_opengl_Display.cpp +++ b/src/native/linux/org_lwjgl_opengl_Display.cpp @@ -448,7 +448,9 @@ GLXFBConfig *chooseVisualGLX13(JNIEnv *env, jobject pixel_format, bool use_displ if (use_display_bpp) { bpp = XDefaultDepthOfScreen(XScreenOfDisplay(getDisplay(), getCurrentScreen())); GLXFBConfig *configs = chooseVisualGLX13FromBPP(env, pixel_format, bpp, drawable_type, double_buffer); - if (configs == NULL) + if (configs != NULL) + return configs; + else bpp = 16; } else bpp = (int)env->GetIntField(pixel_format, env->GetFieldID(cls_pixel_format, "bpp", "I"));