From 83ac2f22d091f2f5634c2d9b5fcc12c67984a2bf Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Fri, 15 Jun 2007 06:58:38 +0000 Subject: [PATCH] Linux: Don't use seperate Display connections to switch display modes --- src/java/org/lwjgl/opengl/LinuxDisplay.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/lwjgl/opengl/LinuxDisplay.java b/src/java/org/lwjgl/opengl/LinuxDisplay.java index c9fdb546..2b8e8d50 100644 --- a/src/java/org/lwjgl/opengl/LinuxDisplay.java +++ b/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -421,11 +421,11 @@ final class LinuxDisplay implements DisplayImplementation { } private void switchDisplayModeOnTmpDisplay(DisplayMode mode) throws LWJGLException { - long tmp_display = openDisplay(); + incDisplay(); try { - nSwitchDisplayMode(tmp_display, nGetDefaultScreen(tmp_display), current_displaymode_extension, mode); + nSwitchDisplayMode(getDisplay(), getDefaultScreen(), current_displaymode_extension, mode); } finally { - closeDisplay(tmp_display); + decDisplay(); } } private static native void nSwitchDisplayMode(long display, int screen, int extension, DisplayMode mode) throws LWJGLException; @@ -495,11 +495,11 @@ final class LinuxDisplay implements DisplayImplementation { } private void setGammaRampOnTmpDisplay(ByteBuffer native_gamma) throws LWJGLException { - long tmp_display = openDisplay(); + incDisplay(); try { - nSetGammaRamp(tmp_display, nGetDefaultScreen(tmp_display), native_gamma); + nSetGammaRamp(getDisplay(), getDefaultScreen(), native_gamma); } finally { - closeDisplay(tmp_display); + decDisplay(); } } private static native void nSetGammaRamp(long display, int screen, ByteBuffer gammaRamp) throws LWJGLException;