From c9d63db448f14a9fdd21d35128f51d2b2321f929 Mon Sep 17 00:00:00 2001 From: Up Date: Tue, 10 Sep 2024 14:05:50 +0200 Subject: [PATCH] search custom RENDERDOC_HOME first --- .../upcraft/sparkweave/client/render/RenderDocHelper.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Common/src/main/java/dev/upcraft/sparkweave/client/render/RenderDocHelper.java b/Common/src/main/java/dev/upcraft/sparkweave/client/render/RenderDocHelper.java index 52404a6..4cb5d77 100644 --- a/Common/src/main/java/dev/upcraft/sparkweave/client/render/RenderDocHelper.java +++ b/Common/src/main/java/dev/upcraft/sparkweave/client/render/RenderDocHelper.java @@ -16,11 +16,10 @@ public static void init() { if(SparkweaveApi.Client.LOAD_RENDERDOC) { var libraryPath = System.getProperty("java.library.path"); + // if set, search in RENDERDOC_HOME first, then fall back to library path var rdHome = System.getenv("RENDERDOC_HOME"); if(rdHome != null) { - LOGGER.debug("appending RENDERDOC_HOME to native library path"); - libraryPath += File.pathSeparatorChar + rdHome; - System.setProperty("java.library.path", libraryPath); + libraryPath = rdHome + File.pathSeparator + rdHome; } var libraryName = System.mapLibraryName("renderdoc");