Reduce indentation in choosePixelFormat

bzip2
Graham 5 years ago
parent 5a3ec74a91
commit 4e5217db0c
  1. 12
      gl-natives/src/main/c/jaggl.c

@ -574,14 +574,16 @@ 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) {
continue;
}
jaggl_double_buffered = double_buffered; jaggl_double_buffered = double_buffered;
jaggl_alpha_bits = alpha_bits; jaggl_alpha_bits = alpha_bits;
result = JNI_TRUE; result = JNI_TRUE;
goto dsi_free; goto dsi_free;
} }
}
#elif defined(_WIN32) #elif defined(_WIN32)
JAWT_Win32DrawingSurfaceInfo *platformInfo = (JAWT_Win32DrawingSurfaceInfo *) dsi->platformInfo; JAWT_Win32DrawingSurfaceInfo *platformInfo = (JAWT_Win32DrawingSurfaceInfo *) dsi->platformInfo;
if (!platformInfo) { if (!platformInfo) {
@ -664,14 +666,16 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc
continue; continue;
} }
if (SetPixelFormat(jaggl_device, format, &pfd)) { if (!SetPixelFormat(jaggl_device, format, &pfd)) {
continue;
}
jaggl_alpha_bits = alpha_bits; jaggl_alpha_bits = alpha_bits;
result = JNI_TRUE; result = JNI_TRUE;
goto dsi_free; goto dsi_free;
} }
} }
}
PIXELFORMATDESCRIPTOR pfd = { PIXELFORMATDESCRIPTOR pfd = {
.nSize = sizeof(pfd), .nSize = sizeof(pfd),

Loading…
Cancel
Save