Skip to content

Commit a62ae6f

Browse files
committed
feat: restricted to Linux/FreeBSD platforms
1 parent e740faf commit a62ae6f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

jme3-core/src/main/java/com/jme3/system/JmeSystemDelegate.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,12 @@ public Platform getPlatform() {
310310
}
311311

312312
public boolean isWaylandSession() {
313-
// The following matches the test GLFW does to enable the Wayland backend.
314-
if ("wayland".equalsIgnoreCase(System.getenv("XDG_SESSION_TYPE")) && System.getenv("WAYLAND_DISPLAY") != null) {
315-
return true;
313+
Platform platform = getPlatform();
314+
if (platform.getOs() == Platform.Os.Linux) {
315+
// The following matches the test GLFW does to enable the Wayland backend.
316+
if ("wayland".equalsIgnoreCase(System.getenv("XDG_SESSION_TYPE")) && System.getenv("WAYLAND_DISPLAY") != null) {
317+
return true;
318+
}
316319
}
317320
return false;
318321
}

0 commit comments

Comments
 (0)