Major client code cleanup

This commit is contained in:
Woah 2021-03-24 15:51:22 -04:00
parent 9b97a8799a
commit 9a3d79abf0
235 changed files with 29482 additions and 29717 deletions

View file

@ -1,9 +1,6 @@
package org.runite.client;
import java.awt.DisplayMode;
import java.awt.Frame;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.*;
import java.lang.reflect.Field;
public class Display {
@ -12,6 +9,23 @@ public class Display {
private DisplayMode displayMode;
public Display() throws Exception {
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
this.graphicsDevice = env.getDefaultScreenDevice();
if (!this.graphicsDevice.isFullScreenSupported()) {
for (int i = 0; env.getScreenDevices().length > i; ++i) {
GraphicsDevice device = env.getScreenDevices()[i];
if (device != null && device.isFullScreenSupported()) {
this.graphicsDevice = device;
return;
}
}
throw new Exception();
}
}
private void method917(Frame var1) {
boolean var3 = false;
@ -121,21 +135,4 @@ public class Display {
this.method917(null);
}
public Display() throws Exception {
GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
this.graphicsDevice = env.getDefaultScreenDevice();
if (!this.graphicsDevice.isFullScreenSupported()) {
for (int i = 0; env.getScreenDevices().length > i; ++i) {
GraphicsDevice device = env.getScreenDevices()[i];
if (device != null && device.isFullScreenSupported()) {
this.graphicsDevice = device;
return;
}
}
throw new Exception();
}
}
}