Linux: Moved trivial methods from native to java
This commit is contained in:
parent
323a317658
commit
4def20c892
|
@ -55,8 +55,15 @@ final class LinuxDisplay implements DisplayImplementation {
|
||||||
public native void resetDisplayMode();
|
public native void resetDisplayMode();
|
||||||
public native int getGammaRampLength();
|
public native int getGammaRampLength();
|
||||||
public native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException;
|
public native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException;
|
||||||
public native String getAdapter();
|
|
||||||
public native String getVersion();
|
public String getAdapter() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public native DisplayMode init();
|
public native DisplayMode init();
|
||||||
public native void setTitle(String title);
|
public native void setTitle(String title);
|
||||||
public native boolean isCloseRequested();
|
public native boolean isCloseRequested();
|
||||||
|
@ -72,7 +79,10 @@ final class LinuxDisplay implements DisplayImplementation {
|
||||||
public native void reshape(int x, int y, int width, int height);
|
public native void reshape(int x, int y, int width, int height);
|
||||||
public native DisplayMode[] getAvailableDisplayModes();
|
public native DisplayMode[] getAvailableDisplayModes();
|
||||||
/* Mouse */
|
/* Mouse */
|
||||||
public native boolean hasWheel();
|
public boolean hasWheel() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public native int getButtonCount();
|
public native int getButtonCount();
|
||||||
public native void createMouse();
|
public native void createMouse();
|
||||||
public native void destroyMouse();
|
public native void destroyMouse();
|
||||||
|
|
|
@ -236,10 +236,6 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getMaxCursorSize
|
||||||
return width_return > height_return ? height_return : width_return;
|
return width_return > height_return ? height_return : width_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_hasWheel(JNIEnv *env , jobject this) {
|
|
||||||
return JNI_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getButtonCount(JNIEnv *env, jobject this) {
|
JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getButtonCount(JNIEnv *env, jobject this) {
|
||||||
return NUM_BUTTONS;
|
return NUM_BUTTONS;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ bool checkXError(JNIEnv *env) {
|
||||||
if (env != NULL)
|
if (env != NULL)
|
||||||
throwException(env, error_message);
|
throwException(env, error_message);
|
||||||
else
|
else
|
||||||
printfDebugJava(env, error_message);
|
printfDebug(error_message);
|
||||||
return false;
|
return false;
|
||||||
} else
|
} else
|
||||||
return true;
|
return true;
|
||||||
|
@ -691,14 +691,6 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_init(JNIEnv *env, j
|
||||||
return initDisplay(env, getCurrentScreen());
|
return initDisplay(env, getCurrentScreen());
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getAdapter(JNIEnv *env , jobject this) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getVersion(JNIEnv *env, jobject this) {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_createContext(JNIEnv *env, jobject this, jobject pixel_format) {
|
||||||
Display *disp = incDisplay(env);
|
Display *disp = incDisplay(env);
|
||||||
if (disp == NULL) {
|
if (disp == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue