Linux: Moved trivial methods from native to java

This commit is contained in:
Elias Naur 2005-01-06 14:03:48 +00:00
parent 323a317658
commit 4def20c892
3 changed files with 14 additions and 16 deletions

View File

@ -55,8 +55,15 @@ final class LinuxDisplay implements DisplayImplementation {
public native void resetDisplayMode();
public native int getGammaRampLength();
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 void setTitle(String title);
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 DisplayMode[] getAvailableDisplayModes();
/* Mouse */
public native boolean hasWheel();
public boolean hasWheel() {
return true;
}
public native int getButtonCount();
public native void createMouse();
public native void destroyMouse();

View File

@ -236,10 +236,6 @@ JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getMaxCursorSize
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) {
return NUM_BUTTONS;
}

View File

@ -115,7 +115,7 @@ bool checkXError(JNIEnv *env) {
if (env != NULL)
throwException(env, error_message);
else
printfDebugJava(env, error_message);
printfDebug(error_message);
return false;
} else
return true;
@ -691,14 +691,6 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_init(JNIEnv *env, j
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) {
Display *disp = incDisplay(env);
if (disp == NULL) {