From 2baea101986058cdbc3c187a0f090c19a4511a64 Mon Sep 17 00:00:00 2001 From: Filip Ryblad Date: Wed, 27 Mar 2024 20:52:45 +0100 Subject: [PATCH] Disable hardware acceleration --- src/main/java/ninjabrainbot/Main.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/ninjabrainbot/Main.java b/src/main/java/ninjabrainbot/Main.java index 5b04a94e..d953be1b 100644 --- a/src/main/java/ninjabrainbot/Main.java +++ b/src/main/java/ninjabrainbot/Main.java @@ -19,9 +19,7 @@ public class Main { public static final String VERSION = "1.4.2"; public static void main(String[] args) { - Optional sessionType = Optional.ofNullable(System.getenv("XDG_SESSION_TYPE")); // Hardware acceleration isn't supported when running java on wayland so we turn it off - System.setProperty("sun.java2d.opengl", sessionType.orElse("").equals("wayland") ? "false" : "True"); - boolean isSplashScreenDisabled = sessionType.isPresent(); + boolean isSplashScreenDisabled = Optional.ofNullable(System.getenv("XDG_SESSION_TYPE")).isPresent(); // Splash screen does not work for linux (wayland) so we turn it off Progress.init(new Splash(isSplashScreenDisabled)); Progress.setTask("Loading language", 0.02f); Profiler.start("Initialize language");