Fixed second DLL not patching properly.

This commit is contained in:
Jeddunk 2020-08-25 13:51:33 +02:00
parent 619d774ad1
commit efa6fd29bc

View File

@ -350,7 +350,7 @@ public class Controller {
*/ */
private void setUpCreamApi() throws IOException { private void setUpCreamApi() throws IOException {
Path path = Paths.get(steamApiPathString); Path path = Paths.get(steamApiPathString);
copyDllFile(path); copyDllFile(path, isSameFile);
findAdditionalDll(path); findAdditionalDll(path);
} }
@ -363,14 +363,11 @@ public class Controller {
InputStream is = Files.newInputStream(secondDll); InputStream is = Files.newInputStream(secondDll);
String md5 = DigestUtils.md5Hex(is); String md5 = DigestUtils.md5Hex(is);
boolean isSameFile1 = Objects.equals(md5, handler.getDllMd5(!is64Bit)); boolean isSameFile1 = Objects.equals(md5, handler.getDllMd5(!is64Bit));
if (isSameFile1) { copyDllFile(secondDll, isSameFile1);
System.out.println("Alternative DLL not patched! Patching...");
copyDllFile(secondDll);
}
} }
} }
private void copyDllFile(Path path) throws IOException { private void copyDllFile(Path path, boolean isSameFile) throws IOException {
if (!isSameFile) { if (!isSameFile) {
String pathOrigString = steamApiPathString; String pathOrigString = steamApiPathString;
pathOrigString = pathOrigString =