Skip to content

Commit

Permalink
Disable hardware acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninjabrain1 committed Mar 27, 2024
1 parent ca410bb commit 2baea10
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/main/java/ninjabrainbot/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ public class Main {
public static final String VERSION = "1.4.2";

public static void main(String[] args) {
Optional<String> 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");
Expand Down

0 comments on commit 2baea10

Please sign in to comment.