mirror of
https://github.com/Eaglercraft-Archive/EaglercraftX-1.8-workspace.git
synced 2026-06-21 10:33:43 +02:00
u30
This commit is contained in:
@@ -21,6 +21,7 @@ import com.google.common.collect.Lists;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
import net.lax1dude.eaglercraft.v1_8.IOUtils;
|
||||
@@ -788,7 +789,17 @@ public class Minecraft implements IThreadListener {
|
||||
long l = System.nanoTime();
|
||||
this.mcProfiler.startSection("tick");
|
||||
|
||||
for (int j = 0; j < this.timer.elapsedTicks; ++j) {
|
||||
if (this.timer.elapsedTicks > 1) {
|
||||
long watchdog = System.currentTimeMillis();
|
||||
for (int j = 0; j < this.timer.elapsedTicks; ++j) {
|
||||
this.runTick();
|
||||
long millis = System.currentTimeMillis();
|
||||
if (millis - watchdog > 50l) {
|
||||
watchdog = millis;
|
||||
EagUtils.sleep(0l);
|
||||
}
|
||||
}
|
||||
} else if (this.timer.elapsedTicks == 1) {
|
||||
this.runTick();
|
||||
}
|
||||
|
||||
@@ -876,7 +887,11 @@ public class Minecraft implements IThreadListener {
|
||||
|
||||
public void updateDisplay() {
|
||||
this.mcProfiler.startSection("display_update");
|
||||
Display.setVSync(this.gameSettings.enableVsync);
|
||||
if (Display.isVSyncSupported()) {
|
||||
Display.setVSync(this.gameSettings.enableVsync);
|
||||
} else {
|
||||
this.gameSettings.enableVsync = false;
|
||||
}
|
||||
Display.update();
|
||||
this.mcProfiler.endSection();
|
||||
this.checkWindowResize();
|
||||
|
||||
Reference in New Issue
Block a user