diff --git a/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java b/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java index 7aa291b8..04f8ee76 100644 --- a/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java +++ b/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java @@ -398,7 +398,7 @@ public class NativeMethodStubsGenerator { writer.println("\twhile ( " + n + "_i < " + pointerArray_annotation.value() + " ) {"); if ( lengths.length() == 0 ) { writer.println("\t\t" + param.getSimpleName() + n + "[" + n + "_i++] = " + n + "_address;"); - writer.println("\t\t" + n + "_address += strlen(" + n + "_address) + 1;"); + writer.println("\t\t" + n + "_address += strlen((const char *)" + n + "_address) + 1;"); } else { writer.println("\t\t" + param.getSimpleName() + n + "[" + n + "_i] = " + n + "_address;"); writer.println("\t\t" + n + "_address += " + lengths + BUFFER_ADDRESS_POSTFIX + "[" + n + "_i++];"); diff --git a/src/native/linux/opengl/org_lwjgl_opengl_Display.c b/src/native/linux/opengl/org_lwjgl_opengl_Display.c index 4a641394..e0a5721f 100644 --- a/src/native/linux/opengl/org_lwjgl_opengl_Display.c +++ b/src/native/linux/opengl/org_lwjgl_opengl_Display.c @@ -188,8 +188,8 @@ static void setWindowTitle(Display *disp, Window window, jlong title, jint len) static void setClassHint(Display *disp, Window window, jlong wm_name, jlong wm_class) { XClassHint* hint = XAllocClassHint(); - hint->res_name = (const unsigned char *)(intptr_t)wm_name; - hint->res_class = (const unsigned char *)(intptr_t)wm_class; + hint->res_name = (char *)(intptr_t)wm_name; + hint->res_class = (char *)(intptr_t)wm_class; XSetClassHint(disp, window, hint); diff --git a/src/native/macosx/context.m b/src/native/macosx/context.m index cd16a29e..1bc8c359 100644 --- a/src/native/macosx/context.m +++ b/src/native/macosx/context.m @@ -101,6 +101,8 @@ NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool g bpp = 16; else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) bpp = 8; + else + bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); } else { bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); } @@ -118,9 +120,9 @@ NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool g bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); // TODO: Add floating_point_packed attribute below - bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + //bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); // TODO: Add sRGB attribute below - bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + //bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); attrib_list_t attribs; jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL");