From c3df26f5cb2db21acd76fb0dcfcee8eae098ca5a Mon Sep 17 00:00:00 2001 From: James Seibel Date: Sun, 15 Mar 2026 14:54:06 -0500 Subject: [PATCH] Disable Mac initial startup delay --- .../core/render/RenderParams.java | 74 +++++++++---------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/core/src/main/java/com/seibel/distanthorizons/core/render/RenderParams.java b/core/src/main/java/com/seibel/distanthorizons/core/render/RenderParams.java index 0f9f60e3b..5b4564b14 100644 --- a/core/src/main/java/com/seibel/distanthorizons/core/render/RenderParams.java +++ b/core/src/main/java/com/seibel/distanthorizons/core/render/RenderParams.java @@ -172,43 +172,43 @@ public class RenderParams extends DhApiRenderParam } - // potential fix for a segfault when - // Sodium and DH are running together - if (EPlatform.get() == EPlatform.MACOS - && !initialLoadingComplete) - { - // Once MC starts rendering, wait a few seconds so - // MC/Sodium can finish their shader compiling before DH does its own. - // This will allow DH to compile its own shaders after Sodium finishes - // compiling its own. - long nowMs = System.currentTimeMillis(); - long firstAllowedRenderTimeMs = firstRenderTimeMs + TIME_FOR_MAC_TO_FINISH_COMPILING_IN_MS; - if (nowMs < firstAllowedRenderTimeMs) - { - return "Waiting for initial MC compile..."; - } - - - // null shouldn't happen, but just in case - PriorityTaskPicker.Executor renderLoadExecutor = ThreadPoolUtil.getRenderLoadingExecutor(); - if (renderLoadExecutor == null) - { - return "Waiting for DH Threadpool..."; - } - - // wait for DH to finish loading, by the time that's done - // java should have finished all of DH's JIT compiling, - // which will hopefully mean less concurrency and thus a lower - // chance of breaking - // (plus this gives Sodium/vanill a bit longer to finish their setup) - int taskCount = renderLoadExecutor.getQueueSize(); - if (taskCount > 0) - { - return "Waiting for DH JIT compiling..."; - } - - initialLoadingComplete = true; - } + //// potential fix for a segfault when + //// Sodium and DH are running together + //if (EPlatform.get() == EPlatform.MACOS + // && !initialLoadingComplete) + //{ + // // Once MC starts rendering, wait a few seconds so + // // MC/Sodium can finish their shader compiling before DH does its own. + // // This will allow DH to compile its own shaders after Sodium finishes + // // compiling its own. + // long nowMs = System.currentTimeMillis(); + // long firstAllowedRenderTimeMs = firstRenderTimeMs + TIME_FOR_MAC_TO_FINISH_COMPILING_IN_MS; + // if (nowMs < firstAllowedRenderTimeMs) + // { + // return "Waiting for initial MC compile..."; + // } + // + // + // // null shouldn't happen, but just in case + // PriorityTaskPicker.Executor renderLoadExecutor = ThreadPoolUtil.getRenderLoadingExecutor(); + // if (renderLoadExecutor == null) + // { + // return "Waiting for DH Threadpool..."; + // } + // + // // wait for DH to finish loading, by the time that's done + // // java should have finished all of DH's JIT compiling, + // // which will hopefully mean less concurrency and thus a lower + // // chance of breaking + // // (plus this gives Sodium/vanill a bit longer to finish their setup) + // int taskCount = renderLoadExecutor.getQueueSize(); + // if (taskCount > 0) + // { + // return "Waiting for DH JIT compiling..."; + // } + // + // initialLoadingComplete = true; + //} return null;