Skip to content

Commit

Permalink
Fix server-side OS detection
Browse files Browse the repository at this point in the history
  • Loading branch information
eigenraven committed Feb 11, 2023
1 parent 936ab4e commit ee2a9fd
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.system.Platform;
import org.spongepowered.asm.launch.GlobalProperties;
import org.spongepowered.asm.service.mojang.MixinServiceLaunchWrapper;

Expand All @@ -36,7 +35,7 @@ public Lwjgl3ifyCoremod() {
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
if (Platform.get() == Platform.MACOSX) {
if (System.getProperty("os.name").toLowerCase().contains("mac")) {
// AWT event loop deadlocks the main thread with Lwjgl3
System.setProperty("java.awt.headless", "true");
}
Expand Down

0 comments on commit ee2a9fd

Please sign in to comment.