From 2ff1d8107625770905c2d17429d35972d3d67e5e Mon Sep 17 00:00:00 2001 From: Gravita <12893402+gravit0@users.noreply.github.com> Date: Fri, 1 Dec 2023 20:26:06 +0700 Subject: [PATCH] [FEATURE] Support run Minecraft with Wayland --- .../pro/gravit/launcher/client/ClientLauncherEntryPoint.java | 4 ++++ .../main/java/pro/gravit/launcher/client/ClientParams.java | 1 + modules | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java index 368d2967..15436bd5 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientLauncherEntryPoint.java @@ -173,6 +173,10 @@ private static void realMain(String[] args) throws Throwable { if(profile.hasFlag(ClientProfile.CompatibilityFlags.CLASS_CONTROL_API)) { ClientService.classLoaderControl = classLoaderControl; } + if(params.lwjglGlfwWayland) { + String glfwPath = ClientService.findLibrary("glfw_wayland"); + System.setProperty("org.lwjgl.glfw.libname", glfwPath); + } AuthService.username = params.playerProfile.username; AuthService.uuid = params.playerProfile.uuid; KeyService.serverRsaPublicKey = Launcher.getConfig().rsaPublicKey; diff --git a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java index d464dfba..da72aba6 100644 --- a/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java +++ b/LauncherClient/src/main/java/pro/gravit/launcher/client/ClientParams.java @@ -35,6 +35,7 @@ public class ClientParams { public boolean autoEnter; public boolean fullScreen; + public boolean lwjglGlfwWayland; public int ram; diff --git a/modules b/modules index 54f04dd7..4d376aa6 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit 54f04dd7794ebb7c8397b21397c30cec62a0815e +Subproject commit 4d376aa6fcb2167cef2fc5ed373d560ebea6e483