Execute task queue even when rendering a paused replay (fixes #129)

The task queue is executed by MC each frame, not just each tick, so we should do
so as well. Most async actions also rely on it to re-synchronize with the
rendering thread, e.g. skins won't load if we never poll the task queue.
This commit is contained in:
Jonas Herzig
2020-04-15 18:42:39 +02:00
parent a514e53d11
commit 3fedc22899

View File

@@ -224,6 +224,8 @@ public class VideoRenderer implements RenderInfo {
//#endif //#endif
); );
executeTaskQueue();
//#if MC<10800 //#if MC<10800
//$$ if (guiOpeningReplay != null) { //$$ if (guiOpeningReplay != null) {
//$$ guiOpeningReplay.handleInput(); //$$ guiOpeningReplay.handleInput();
@@ -384,7 +386,7 @@ public class VideoRenderer implements RenderInfo {
//#endif //#endif
} }
private void tick() { private void executeTaskQueue() {
//#if MC>=11400 //#if MC>=11400
((MCVer.MinecraftMethodAccessor) mc).replayModExecuteTaskQueue(); ((MCVer.MinecraftMethodAccessor) mc).replayModExecuteTaskQueue();
//#else //#else
@@ -404,6 +406,9 @@ public class VideoRenderer implements RenderInfo {
//#endif //#endif
mc.currentScreen = gui.toMinecraft(); mc.currentScreen = gui.toMinecraft();
}
private void tick() {
//#if MC>=10800 && MC<11400 //#if MC>=10800 && MC<11400
//$$ try { //$$ try {
//$$ mc.runTick(); //$$ mc.runTick();