Fixed some native compilation warnings.
This commit is contained in:
parent
4aac231951
commit
cb759158e7
|
@ -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++];");
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue