Repository navigation
Keep the runtime's files in the game directory when a launcher starts elsewhere - #117
Merged
sambvfx merged 1 commit intoNov 20, 2026
Merged
Conversation
… elsewhere With the Microsoft launcher and a custom Game Directory, the game process starts in the default .minecraft folder, not in the game directory. The runtime looks up rtx.conf, dxvk.conf, its rtx-remix/ folder, its caches and its dump files in the process working directory, while the mod extracts its payload into the game directory. The packaged rtx.conf was therefore never read, the runtime ran on its own defaults, and its log went to a folder nobody was told to look in. One missing setting, rtx.materials.enableUvBoundsLooping, is what scrambles block faces under a pack with height maps. When the working directory is not the game directory, RuntimeHome now names the game directory's location for everything the runtime lets a host move, as the environment variables the runtime reads them from, and the JNI bridge sets them in the process before it loads the runtime. A variable the process started with is left alone, and a value the runtime would misread (longer than 259 characters, or a conf path with a comma) is left unset and logged. Nothing is overridden when the working directory is the game directory, so installs that work today keep the runtime's own relative lookup. The bridge's crash folder is now always under the game directory instead of the working directory at the time of the crash. user.conf and imgui.ini have no variable in the runtime and stay in the working directory; a user.conf in the game directory that will not be read is logged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Sam Bourne <sbourne@nvidia.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With the Microsoft launcher and a custom Game Directory, the game process
starts in the default
.minecraftfolder, not in the game directory. Theruntime looks up
rtx.conf,dxvk.conf, itsrtx-remix/folder, its cachesand its dump files in the process working directory, while the mod extracts
its payload into the game directory. The packaged
rtx.confwas thereforenever read, the runtime ran on its own defaults, and its log went to a folder
nobody was told to look in. One missing setting,
rtx.materials.enableUvBoundsLooping, is what scrambles block faces under apack with height maps, as reported in #115.
When the working directory is not the game directory, the mod now points the
runtime at the game directory through the environment variables the runtime
already reads each location from:
DXVK_RTX_CONFIG_FILE,DXVK_CONFIG_FILE,DXVK_LOG_PATH,DXVK_CAPTURE_PATH,DEFAULT_MODS_DIR,DXVK_STATE_CACHE_PATH,DXVK_METRICS_PATH,DXVK_AFTERMATH_DUMP_PATHandDXVK_SCREENSHOT_PATH.RuntimeHomeinrenderer-coredecides the values,and the JNI bridge sets them in the process before it loads the runtime,
because the runtime reads
DXVK_METRICS_PATHwhile it loads. The bridge'sown
crash\folder is now always under the game directory instead of theworking directory at the time of the crash.
Decisions
Prism, the default Microsoft launcher profile and every install that works
today keep the runtime's own relative lookup. The runtime reads an explicit
location through a narrower path: a 260-character buffer whose overflow it
treats as unset, and for three of the variables the system code page.
runner's
DXVK_RTX_CONFIG_FILEand a player's own override still win.259 characters, or a conf path containing a comma, which the runtime treats
as a list separator.
relative paths against it, and moving it mid-session would split their
files between two folders.
Not covered
user.confandimgui.ini: the runtime has no variable for them and keepsreading and writing them in the working directory. The mod logs a warning
when the game directory holds a
user.confthat will not be read. Movingthem needs a runtime change.
logs\latest.logand the JVM'shs_err_pid*.logfollow theworking directory; they are not the mod's files.
working directory: the runtime writes no
remix-dxvk.logwhen the gamedirectory path has a non-ASCII character, and the bridge DLL fails to load
from a path with characters outside the Windows system code page.
Testing
is not
--gameDir, the runtime log saysNo config file found at: rtx.conf,its log, cache and
rtx-remix/folders land in the working directory, andterrain under RTX Remix Materials 0.61.0 shows the reported streaks.
Using config paths from DXVK_RTX_CONFIG_FILEandFound config file: <game directory>\rtx.conf, terrain renders correctly, the runtime's log,cache, metrics and
rtx-remix/folders are in the game directory, and onlyMinecraft's
logs\latest.logis left in the working directory.variable and logs the same relative
rtx.conflookup as before.rtx.confloads and terrain renders correctly; auser.confplaced in thegame directory produces the warning.
loading the runtime from another working directory, wrote its report and
minidump into the configured folder, including one with an accented path.
RuntimeHomeTestcovers the decisions above.gradlew.bat build testfor Fabric, Forge and NeoForge, andtools\rtx.bat check --tests.starting the client from the command line), and Forge and NeoForge in game;
they share this code path.
Closes #115
🤖 Generated with Claude Code