Skip to content

Commit 93f75bc

Browse files
author
wil
committed
update|x11 wayland
1 parent db482cf commit 93f75bc

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public final class AppSettings extends HashMap<String, Object> {
214214
* @see AppSettings#setAudioRenderer(java.lang.String)
215215
*/
216216
public static final String LWJGL_OPENAL = "LWJGL";
217-
217+
218218
/**
219219
* Use the Android MediaPlayer / SoundPool based renderer for Android audio capabilities.
220220
* <p>
@@ -295,7 +295,7 @@ public final class AppSettings extends HashMap<String, Object> {
295295
defaults.put("UseRetinaFrameBuffer", false);
296296
defaults.put("WindowYPosition", 0);
297297
defaults.put("WindowXPosition", 0);
298-
defaults.put("NativePlatform", true);
298+
defaults.put("X11PlatformPreferred", false);
299299
// defaults.put("Icons", null);
300300
}
301301

@@ -1522,10 +1522,10 @@ public void setDisplay(int mon) {
15221522
* <strong>NOTE:</strong> Note that disabling this option uses GLX (native X11) instead of EGL (native WL).
15231523
* </p>
15241524
*
1525-
* @param nplaf true when using EGL (native), otherwise false if you want to enable GLX
1525+
* @param nplaf true if you want to enable GLX, otherwise false when using EGL (native)
15261526
*/
1527-
public void setNativePlatform(boolean nplaf) {
1528-
put("NativePlatform", nplaf);
1527+
public void setX11PlatformPreferred(boolean nplaf) {
1528+
put("X11PlatformPreferred", nplaf);
15291529
}
15301530

15311531
/**
@@ -1535,9 +1535,9 @@ public void setNativePlatform(boolean nplaf) {
15351535
* Only valid on Linux distributions or derivatives that support Wayland, where it indicates whether GLX or EGL is enabled.
15361536
* </p>
15371537
*
1538-
* @return returns true if used in EGL (native), otherwise false if GLX is enabled
1538+
* @return returns true if GLX is enabled, otherwise false if used in EGL (native)
15391539
*/
1540-
public boolean isNativePlatform() {
1541-
return getBoolean("NativePlatform");
1540+
public boolean isX11PlatformPreferred() {
1541+
return getBoolean("X11PlatformPreferred");
15421542
}
15431543
}

jme3-lwjgl3/src/main/java/com/jme3/system/lwjgl/LwjglWindow.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ public void invoke(int error, long description) {
280280
* Change the platform GLFW uses to enable GLX on Wayland as long as you
281281
* have XWayland (X11 compatibility)
282282
*/
283-
if (!settings.isNativePlatform() && glfwPlatformSupported(GLFW_PLATFORM_X11)) {
283+
if (settings.isX11PlatformPreferred() && glfwPlatformSupported(GLFW_PLATFORM_X11)) {
284284
glfwInitHint(GLFW_PLATFORM, GLFW_PLATFORM_X11);
285285
}
286286

0 commit comments

Comments
 (0)