mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-02-23 08:04:38 +01:00
Windows: Make window visible after pixel format selection and move code from native WindowsDisplay.nCreate to java side.
This commit is contained in:
parent
d2e9a9fb4a
commit
d4ea142f89
|
|
@ -96,6 +96,7 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
private final static int WA_ACTIVE = 1;
|
||||
private final static int WA_CLICKACTIVE = 2;
|
||||
private final static int SW_SHOWMINNOACTIVE = 7;
|
||||
private final static int SW_SHOWDEFAULT = 10;
|
||||
private final static int SW_RESTORE = 9;
|
||||
|
||||
private static WindowsDisplay current_display;
|
||||
|
|
@ -132,6 +133,9 @@ final class WindowsDisplay implements DisplayImplementation {
|
|||
did_maximize = false;
|
||||
nCreateWindow(mode, fullscreen, x, y);
|
||||
peer_info.initDC();
|
||||
showWindow(getHwnd(), SW_SHOWDEFAULT);
|
||||
setForegroundWindow(getHwnd());
|
||||
setFocus(getHwnd());
|
||||
}
|
||||
private native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException;
|
||||
|
||||
|
|
|
|||
|
|
@ -199,10 +199,6 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateWindow(JNIEnv
|
|||
return;
|
||||
}
|
||||
display_hdc = GetDC(display_hwnd);
|
||||
ShowWindow(display_hwnd, SW_SHOWDEFAULT);
|
||||
UpdateWindow(display_hwnd);
|
||||
SetForegroundWindow(display_hwnd);
|
||||
SetFocus(display_hwnd);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nDestroyWindow(JNIEnv *env, jclass clazz) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue