mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-06 15:04:41 +00:00
Linux: Moved a display connection creation to java
This commit is contained in:
parent
5af5828dc6
commit
6e5ed9d1ff
2 changed files with 22 additions and 28 deletions
|
|
@ -79,20 +79,28 @@ final class LinuxDisplay implements DisplayImplementation {
|
|||
private static PeerInfo peer_info;
|
||||
|
||||
private static int getBestDisplayModeExtension() throws LWJGLException {
|
||||
if (System.getenv("LWJGL_DISABLE_XRANDR") == null && isXrandrSupported()) {
|
||||
LWJGLUtil.log("Using Xrandr for display mode switching");
|
||||
return XRANDR;
|
||||
} else if (isXF86VidModeSupported()) {
|
||||
LWJGLUtil.log("Using XF86VidMode for display mode switching");
|
||||
return XF86VIDMODE;
|
||||
} else {
|
||||
LWJGLUtil.log("No display mode extensions available");
|
||||
return NONE;
|
||||
lockAWT();
|
||||
try {
|
||||
incDisplay();
|
||||
int result;
|
||||
if (System.getenv("LWJGL_DISABLE_XRANDR") == null && isXrandrSupported()) {
|
||||
LWJGLUtil.log("Using Xrandr for display mode switching");
|
||||
result = XRANDR;
|
||||
} else if (isXF86VidModeSupported()) {
|
||||
LWJGLUtil.log("Using XF86VidMode for display mode switching");
|
||||
result = XF86VIDMODE;
|
||||
} else {
|
||||
LWJGLUtil.log("No display mode extensions available");
|
||||
result = NONE;
|
||||
}
|
||||
decDisplay();
|
||||
return result;
|
||||
} finally {
|
||||
unlockAWT();
|
||||
}
|
||||
|
||||
}
|
||||
private static native boolean isXrandrSupported() throws LWJGLException;
|
||||
private static native boolean isXF86VidModeSupported() throws LWJGLException;
|
||||
private static native boolean isXrandrSupported();
|
||||
private static native boolean isXF86VidModeSupported();
|
||||
|
||||
private static boolean isNetWMFullscreenSupported() throws LWJGLException {
|
||||
if (System.getenv("LWJGL_DISABLE_NETWM") != null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue