diff --git a/src/main/java/net/vulkanmod/config/Platform.java b/src/main/java/net/vulkanmod/config/Platform.java index 38914708d..20ceef58c 100644 --- a/src/main/java/net/vulkanmod/config/Platform.java +++ b/src/main/java/net/vulkanmod/config/Platform.java @@ -64,6 +64,10 @@ private static String determineDE() { return "N/A"; } + public static boolean shouldSkipWaylandPatches() { + return System.getProperties().containsKey("vkmod.wayland.compat.skip"); + } + public static int getActivePlat() { return activePlat; } diff --git a/src/main/java/net/vulkanmod/mixin/wayland/InputConstantsM.java b/src/main/java/net/vulkanmod/mixin/wayland/InputConstantsM.java index 7c4ee506c..8f5db821a 100644 --- a/src/main/java/net/vulkanmod/mixin/wayland/InputConstantsM.java +++ b/src/main/java/net/vulkanmod/mixin/wayland/InputConstantsM.java @@ -15,7 +15,7 @@ public class InputConstantsM { */ @Redirect(method = "grabOrReleaseMouse", at = @At(value = "INVOKE", target = "Lorg/lwjgl/glfw/GLFW;glfwSetCursorPos(JDD)V")) private static void grabOrReleaseMouse(long window, double xpos, double ypos) { - if (!Platform.isWayLand()) + if (Platform.shouldSkipWaylandPatches() || !Platform.isWayLand()) GLFW.glfwSetCursorPos(window, xpos, ypos); } } \ No newline at end of file diff --git a/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java b/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java index 19d93d508..26fbb879a 100644 --- a/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java +++ b/src/main/java/net/vulkanmod/mixin/wayland/MinecraftMixin.java @@ -31,7 +31,7 @@ public class MinecraftMixin { */ @Redirect(method="", at=@At(value="INVOKE", target="Lcom/mojang/blaze3d/platform/Window;setIcon(Lnet/minecraft/server/packs/PackResources;Lcom/mojang/blaze3d/platform/IconSet;)V")) private void bypassWaylandIcon(Window instance, PackResources packResources, IconSet iconSet) throws IOException { - if (!Platform.isWayLand()) + if (Platform.shouldSkipWaylandPatches() || !Platform.isWayLand()) { this.window.setIcon(this.vanillaPackResources, SharedConstants.getCurrentVersion().stable() ? IconSet.RELEASE : IconSet.SNAPSHOT); }