From e93a23315b144e1be742ab8d33eaf4cccc3f9d3a Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 8 Aug 2019 19:26:29 +0100 Subject: [PATCH] Reduce indentation in chooseContext We don't need to keep indenting like the X11 code as we only call ChoosePixelFormat once. --- gl-natives/src/main/c/jaggl.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gl-natives/src/main/c/jaggl.c b/gl-natives/src/main/c/jaggl.c index 48c0221dc8..fd28a75d40 100644 --- a/gl-natives/src/main/c/jaggl.c +++ b/gl-natives/src/main/c/jaggl.c @@ -513,14 +513,17 @@ JNIEXPORT jboolean JNICALL Java_jaggl_context_choosePixelFormat1(JNIEnv *env, jc .iLayerType = PFD_MAIN_PLANE }; format = ChoosePixelFormat(jaggl_device, &pfd); - if (format) { - if (SetPixelFormat(jaggl_device, format, &pfd)) { - // TODO(gpe): get actual number of alpha bits + if (!format) { + goto dsi_free; + } - result = JNI_TRUE; - goto dsi_free; - } + if (!SetPixelFormat(jaggl_device, format, &pfd)) { + goto dsi_free; } + + // TODO(gpe): get actual number of alpha bits + + result = JNI_TRUE; #else #error Unsupported platform #endif