Skip to content

Commit

Permalink
Add a launch option to disable RTSS workaround (CaffeineMC#2165)
Browse files Browse the repository at this point in the history
  • Loading branch information
Niterux authored Nov 16, 2023
1 parent d7d461f commit 1f44cdd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public static void checkModules() {
}

// RivaTuner hooks the wglCreateContext function, and leaves itself behind as a loaded module
if (modules.stream().anyMatch(module -> module.path.equalsIgnoreCase("RTSSHooks64.dll"))) {
if (Boolean.parseBoolean(System.getProperty("sodium.checks.win32.rtss", "true")) && modules.stream().anyMatch(module -> module.path.equalsIgnoreCase("RTSSHooks64.dll"))) {
LOGGER.error("------------------------------------------------------------------------------------------------------------");
LOGGER.error("READ ME! You appear to be using the RivaTuner Statistics Server (RTSS)!");
LOGGER.error(" * Rivatuner will cause extreme performance issues when using Sodium, and it will likely fill up your hard drive");
Expand All @@ -36,6 +36,10 @@ public static void checkModules() {
LOGGER.error(" * If you don't remember installing RivaTuner, check to see if you have MSI Afterburner installed.");
LOGGER.error(" * For more information on possible workarounds and alternatives to Rivatuner, see the following issue on GitHub:");
LOGGER.error(" https://github.com/CaffeineMC/sodium-fabric/issues/2048");
LOGGER.error(" * HINT: If you believe this is an error, then you can force the game to start anyways by adding the " +
"following JVM argument.");
LOGGER.error(" -Dsodium.checks.win32.rtss" + "=false");
LOGGER.error(" * NOTE: We will not provide support for any issues caused by using this option. You are on your own!");
LOGGER.error("------------------------------------------------------------------------------------------------------------");

throw new RuntimeException("RivaTuner Statistics Server (RTSS) is not compatible with Sodium, " +
Expand Down

0 comments on commit 1f44cdd

Please sign in to comment.