Reduce indentation in choosePixelFormat

master
Graham 5 years ago
parent b849d1a093
commit d6b6e3fd21
  1. 26
      gl-natives/src/main/c/jaggl.c

@ -574,13 +574,15 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc
} }
jaggl_visual_info = glXChooseVisual(jaggl_display, DefaultScreen(jaggl_display), attribs); jaggl_visual_info = glXChooseVisual(jaggl_display, DefaultScreen(jaggl_display), attribs);
if (jaggl_visual_info) { if (!jaggl_visual_info) {
jaggl_double_buffered = double_buffered; continue;
jaggl_alpha_bits = alpha_bits;
result = JNI_TRUE;
goto dsi_free;
} }
jaggl_double_buffered = double_buffered;
jaggl_alpha_bits = alpha_bits;
result = JNI_TRUE;
goto dsi_free;
} }
#elif defined(_WIN32) #elif defined(_WIN32)
JAWT_Win32DrawingSurfaceInfo *platformInfo = (JAWT_Win32DrawingSurfaceInfo *) dsi->platformInfo; JAWT_Win32DrawingSurfaceInfo *platformInfo = (JAWT_Win32DrawingSurfaceInfo *) dsi->platformInfo;
@ -664,12 +666,14 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc
continue; continue;
} }
if (SetPixelFormat(jaggl_device, format, &pfd)) { if (!SetPixelFormat(jaggl_device, format, &pfd)) {
jaggl_alpha_bits = alpha_bits; continue;
result = JNI_TRUE;
goto dsi_free;
} }
jaggl_alpha_bits = alpha_bits;
result = JNI_TRUE;
goto dsi_free;
} }
} }

Loading…
Cancel
Save