diff --git a/Common/Common.vcxproj b/Common/Common.vcxproj index ca60a6c..588f943 100644 --- a/Common/Common.vcxproj +++ b/Common/Common.vcxproj @@ -37,6 +37,9 @@ + + + 16.0 Win32Proj diff --git a/Common/Common.vcxproj.filters b/Common/Common.vcxproj.filters index cd51572..1be0804 100644 --- a/Common/Common.vcxproj.filters +++ b/Common/Common.vcxproj.filters @@ -44,4 +44,7 @@ Source Files + + + \ No newline at end of file diff --git a/Common/cpp.hint b/Common/cpp.hint new file mode 100644 index 0000000..8b3da97 --- /dev/null +++ b/Common/cpp.hint @@ -0,0 +1,4 @@ +// Hint files help the Visual Studio IDE interpret Visual C++ identifiers +// such as names of functions and macros. +// For more information see https://go.microsoft.com/fwlink/?linkid=865984 +#define NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Type, __VA_ARGS__) inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_TO, __VA_ARGS__)) } inline void from_json(const nlohmann::json& nlohmann_json_j, Type& nlohmann_json_t) { NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, __VA_ARGS__)) } diff --git a/Common/src/Config.cpp b/Common/src/Config.cpp index cff5e26..0874e75 100644 --- a/Common/src/Config.cpp +++ b/Common/src/Config.cpp @@ -11,6 +11,7 @@ void from_json(const json& j, SteamPlatform& p) { from_json(j, (Platform&) p); j["unlock_shared_library"].get_to(p.unlock_shared_library); + j["unlock_dlc"].get_to(p.unlock_dlc); } NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Platforms, Steam, EpicGames, Origin, UplayR1) diff --git a/Common/src/Config.h b/Common/src/Config.h index c88a3ab..84fb2b1 100644 --- a/Common/src/Config.h +++ b/Common/src/Config.h @@ -13,7 +13,8 @@ struct Platform struct SteamPlatform : Platform { - bool unlock_shared_library = true; + bool unlock_dlc = true; + bool unlock_shared_library = false; }; struct Platforms diff --git a/Common/src/constants.h b/Common/src/constants.h index f1929de..3b0180f 100644 --- a/Common/src/constants.h +++ b/Common/src/constants.h @@ -1,6 +1,6 @@ #pragma once -constexpr auto VERSION = "1.2.2"; +constexpr auto VERSION = "1.3.0"; constexpr auto INTEGRATION_64 = L"Integration64.dll"; constexpr auto INTEGRATION_32 = L"Integration32.dll"; diff --git a/Config.jsonc b/Config.jsonc index 9350273..6ba02db 100644 --- a/Config.jsonc +++ b/Config.jsonc @@ -1,12 +1,17 @@ { - "config_version": 3, // DO NOT EDIT THIS VALUE + "config_version": 4, // DO NOT EDIT THIS VALUE "log_level": "info", "platforms": { "Steam": { "enabled": true, "process": "steam.exe", "replicate": false, + "unlock_dlc": true, "unlock_shared_library": false, + "blacklist": [ // Get App ID from SteamDB + "22618", // Alien Breed: Impact - PL Check [Do not force polish language] + "67379" // Darkness II Low Violence [Do not censor violence] + ], "ignore": [ "x86launcher.exe", "x64launcher.exe", @@ -17,45 +22,41 @@ "gldriverquery64.exe", "vulkandriverquery.exe", "vulkandriverquery64.exe" - ], - "blacklist": [ // Get App ID from SteamDB - "22618", // Alien Breed: Impact - PL Check [Do not force polish language] - "67379" // Darkness II Low Violence [Do not censor violence] ] }, "EpicGames": { "enabled": true, "process": "EpicGamesLauncher.exe", "replicate": true, + "blacklist": [ // Get DLC ID from ScreamDB + "ffffffffffffffffffffffffffffffff" // A Total War Sage: TROY [It actually asks this ID...] + ], "ignore": [ "EpicWebHelper.exe", "EpicOnlineServicesHost.exe", "EpicOnlineServicesUserHelper.exe", "UnrealCEFSubProcess.exe" - ], - "blacklist": [ // Get DLC ID from ScreamDB - "ffffffffffffffffffffffffffffffff" // A Total War Sage: TROY [It actually asks this ID...] ] }, "Origin": { "enabled": true, "process": "Origin.exe", "replicate": false, - "ignore": [], "blacklist": [ // Use ItemId from Unlocker32.Origin.log - // "SIMS4.OFF.SOLP.0x0000000000030553" // Sims 4: Get Famous [Better stay anonymous] - ] + + ], + "ignore": [] }, "UplayR1": { "enabled": true, "process": "upc.exe", "replicate": true, + "blacklist": [ // Use aUplayId from the generated log file + + ], "ignore": [ "UplayService.exe", "UplayWebCore.exe" - ], - "blacklist": [ // Use aUplayId from the generated log file - ] } }, diff --git a/Unlocker/src/ProcessHooker.cpp b/Unlocker/src/ProcessHooker.cpp index 30b0521..5f314b4 100644 --- a/Unlocker/src/ProcessHooker.cpp +++ b/Unlocker/src/ProcessHooker.cpp @@ -140,24 +140,35 @@ void injectIfNecessary(wstring cmdLine, LPPROCESS_INFORMATION lpProcessInformati { for(const auto& ignoredProcess : platform.ignore) { - if(stringsAreEqual(newProcName, ignoredProcess)) + if(stringsAreEqual(newProcName, ignoredProcess, true)) { // Do not inject since the process is ignored for this platforms logger->debug("Skipping injection since the new process is ignored for this platform"); return; } } - // Special case of Steam->Uplay integration - if(contains(wtos(cmdLine), "uplay_steam_mode")) + + // Special Steam checks + if(stringsAreEqual(config->platformRefs.Steam.process, platform.process, true)) { - if(!config->platformRefs.UplayR1.replicate) + // Steam->Uplay integration + if(contains(wtos(cmdLine), "uplay_steam_mode")) { - logger->debug("Skipping injection since Uplay replication is disabled"); - return; + if(!config->platformRefs.UplayR1.replicate) + { + logger->debug("Skipping injection since Uplay replication is disabled"); + return; + } + else + { + break; + } } - else + + if(!config->platformRefs.Steam.unlock_dlc) { - break; + logger->debug("Skipping injection since DLC unlocking in Steam is disabled"); + return; } } diff --git a/Unlocker/src/UpdateChecker.cpp b/Unlocker/src/UpdateChecker.cpp index 039ae3b..e0e5f94 100644 --- a/Unlocker/src/UpdateChecker.cpp +++ b/Unlocker/src/UpdateChecker.cpp @@ -24,7 +24,7 @@ void UpdateChecker::checkForUpdates() { logger->warn( "A new Koalageddon version {} has been released. Get it from: {} ", - currentVersionTag, latest_release_url + tagName, latest_release_url ); } }).detach(); diff --git a/Unlocker/src/platforms/steam/Steam.cpp b/Unlocker/src/platforms/steam/Steam.cpp index be579b7..a240011 100644 --- a/Unlocker/src/platforms/steam/Steam.cpp +++ b/Unlocker/src/platforms/steam/Steam.cpp @@ -7,10 +7,13 @@ void Steam::platformInit() { - HOOK(SteamInternal_FindOrCreateUserInterface); - HOOK(SteamInternal_CreateInterface); - HOOK(SteamApps); - HOOK(SteamClient); + if(config->platformRefs.Steam.unlock_dlc) + { + HOOK(SteamInternal_FindOrCreateUserInterface); + HOOK(SteamInternal_CreateInterface); + HOOK(SteamApps); + HOOK(SteamClient); + } } string Steam::getPlatformName() diff --git a/Unlocker/src/platforms/steam_client/SteamClient.cpp b/Unlocker/src/platforms/steam_client/SteamClient.cpp index e73df30..8514c03 100644 --- a/Unlocker/src/platforms/steam_client/SteamClient.cpp +++ b/Unlocker/src/platforms/steam_client/SteamClient.cpp @@ -85,7 +85,7 @@ void SteamClient::installHooks() HOOK(SharedLibraryLockStatus); HOOK(SharedLibraryStopPlaying); } - if(!config->platformRefs.Steam.replicate) + if(config->platformRefs.Steam.unlock_dlc && !config->platformRefs.Steam.replicate) { HOOK(IsAppDLCEnabled); HOOK(IsSubscribedApp); diff --git a/inno_setup.iss b/inno_setup.iss index aac50f7..2066239 100644 --- a/inno_setup.iss +++ b/inno_setup.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "Koalageddon" -#define MyAppVersion "1.2.2" +#define MyAppVersion "1.3.0" #define MyAppPublisher "acidicoala" #define MyAppURL "https://github.com/acidicoala/Koalageddon" #define MyAppExeName "IntegrationWizard32.exe"