Windows: Generalized WindowsDispaly.nCreateWindow

This commit is contained in:
Elias Naur 2008-05-05 16:46:16 +00:00
parent b6b83936ac
commit 5e06f19944
3 changed files with 4 additions and 9 deletions

View file

@ -45,7 +45,7 @@ import org.lwjgl.opengl.Display;
* $Id$
*/
final class WindowsSysImplementation extends DefaultSysImplementation {
private final static int JNI_VERSION = 18;
private final static int JNI_VERSION = 19;
static {
Sys.initialize();

View file

@ -164,7 +164,7 @@ final class WindowsDisplay implements DisplayImplementation {
this.parent = parent;
long parent_hwnd = parent != null ? getHwnd(parent) : 0;
boolean isUndecorated = isUndecorated();
this.hwnd = nCreateWindow(mode, fullscreen, x, y, isUndecorated, parent != null, parent_hwnd);
this.hwnd = nCreateWindow(fullscreen, x, y, mode.getWidth(), mode.getHeight(), isUndecorated, parent != null, parent_hwnd);
if (hwnd == 0) {
throw new LWJGLException("Failed to create window");
}
@ -187,7 +187,7 @@ final class WindowsDisplay implements DisplayImplementation {
throw e;
}
}
private native long nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y, boolean undecorated, boolean child_window, long parent_hwnd) throws LWJGLException;
private native long nCreateWindow(boolean fullscreen, int x, int y, int width, int height, boolean undecorated, boolean child_window, long parent_hwnd) throws LWJGLException;
private static boolean isUndecorated() {
return Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated");