Windows: Re-add UpdateWindow to make sure fullscreen windows are cleared faster

This commit is contained in:
Elias Naur 2007-01-04 13:44:23 +00:00
parent 1bc9ac0aad
commit 0234336feb
2 changed files with 7 additions and 0 deletions

View File

@ -136,6 +136,7 @@ final class WindowsDisplay implements DisplayImplementation {
showWindow(getHwnd(), SW_SHOWDEFAULT);
setForegroundWindow(getHwnd());
setFocus(getHwnd());
updateWindow(getHwnd());
}
private native void nCreateWindow(DisplayMode mode, boolean fullscreen, int x, int y) throws LWJGLException;
@ -181,6 +182,7 @@ final class WindowsDisplay implements DisplayImplementation {
private static native void showWindow(long hwnd, int mode);
private static native void setForegroundWindow(long hwnd);
private static native void setFocus(long hwnd);
private static native void updateWindow(long hwnd);
private void restoreDisplayMode() {
try {

View File

@ -247,6 +247,11 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetGammaRamp(JNIEnv
setGammaRamp(env, gamma_buffer);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_updateWindow(JNIEnv *env, jclass unused, jlong hwnd_ptr) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
UpdateWindow(hwnd);
}
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_showWindow(JNIEnv *env, jclass unused, jlong hwnd_ptr, jint mode) {
HWND hwnd = (HWND)(INT_PTR)hwnd_ptr;
ShowWindow(hwnd, mode);