Skip to content

Commit b98bf4f

Browse files
committed
Merge pull request #82 from toolbox4minecraft/fixing-java2d
fixing java2d
2 parents ddb4813 + 1410258 commit b98bf4f

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/main/java/amidst/Amidst.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,13 @@ public void run() {
9999
}
100100

101101
private static void initGui() {
102-
initLookAndFeel();
103102
setJava2DEnvironmentVariables();
103+
initLookAndFeel();
104+
}
105+
106+
private static void setJava2DEnvironmentVariables() {
107+
System.setProperty("sun.java2d.opengl", "True");
108+
System.setProperty("sun.java2d.accthreshold", "0");
104109
}
105110

106111
private static void initLookAndFeel() {
@@ -116,12 +121,7 @@ private static void initLookAndFeel() {
116121
}
117122

118123
private static boolean isWindows() {
119-
return System.getProperty("os.name").contains("win");
120-
}
121-
122-
private static void setJava2DEnvironmentVariables() {
123-
System.setProperty("sun.java2d.opengl", "True");
124-
System.setProperty("sun.java2d.accthreshold", "0");
124+
return System.getProperty("os.name").toLowerCase().contains("win");
125125
}
126126

127127
@CalledOnlyBy(AmidstThread.EDT)

src/main/java/amidst/gui/main/viewer/widget/DebugWidget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected List<String> getTextLines() {
4545
"",
4646
"Viewer:",
4747
"Size: " + columns + "x" + rows + " [" + (columns * rows) + "]",
48-
String.format("2D Accelerated: %1$.1f%%", accelerationCounter.getAcceleratedPercentage())
48+
String.format("Acceleration: %1$.1f%%", accelerationCounter.getAcceleratedPercentage())
4949
);
5050
// @formatter:on
5151
} else {

0 commit comments

Comments
 (0)