Added more overlays, reiniting DXGIFactory for every overlay (Let's test this way)

This commit is contained in:
cdozdil committed 2025-05-08 13:48:56 +03:00
1 parent 8c1743d3ca
commit d77439fbfa
2 files changed
+23 -14

No files matched your search

+16 -8
View File
@@ -9,28 +9,36 @@
inline std::vector<std::string> dllNames;
inline std::vector<std::wstring> dllNamesW;
inline std::vector<std::string> overlayNames = { "eosovh-win32-shipping.dll", "eosovh-win32-shipping", "eosovh-win64-shipping.dll", "eosovh-win64-shipping",
"gameoverlayrenderer64", "gameoverlayrenderer64.dll", "gameoverlayrenderer", "gameoverlayrenderer.dll",
"socialclubd3d12renderer", "socialclubd3d12renderer.dll",
"owutils.dll", "owutils",
//"rtsshooks64.dll", "rtsshooks64", "rtsshooks.dll", "rtsshooks",
"overlay64", "overlay64.dll", "overlay", "overlay.dll" };
//"rtsshooks64.dll", "rtsshooks64", "rtsshooks.dll", "rtsshooks",
inline std::vector<std::string> overlayNames = { "eosovh-win32-shipping.dll", "eosovh-win32-shipping", "eosovh-win64-shipping.dll", "eosovh-win64-shipping", // Epic
"gameoverlayrenderer64", "gameoverlayrenderer64.dll", "gameoverlayrenderer", "gameoverlayrenderer.dll", // Steam
"socialclubd3d12renderer", "socialclubd3d12renderer.dll", // Rockstar
"owutils.dll", "owutils", // Overwolf
"galaxy.dll", "galaxy", "galaxy64.dll", "galaxy64", // GOG Galaxy
"discordoverlay.dll", "discordoverlay", "discordoverlay64.dll", "discordoverlay64", // Discord
"overlay64", "overlay64.dll", "overlay", "overlay.dll" }; // Ubisoft
inline std::vector<std::wstring> overlayNamesW = { L"eosovh-win32-shipping.dll", L"eosovh-win32-shipping", L"eosovh-win64-shipping.dll", L"eosovh-win64-shipping",
L"gameoverlayrenderer64", L"gameoverlayrenderer64.dll", L"gameoverlayrenderer", L"gameoverlayrenderer.dll",
L"socialclubd3d12renderer", L"socialclubd3d12renderer.dll",
L"owutils.dll", L"owutils",
//L"rtsshooks64.dll", L"rtsshooks64", L"rtsshooks.dll", L"rtsshooks",
L"galaxy.dll", L"galaxy", L"galaxy64.dll", L"galaxy64",
L"discordoverlay.dll", L"discordoverlay", L"discordoverlay64.dll", L"discordoverlay64",
L"overlay64", L"overlay64.dll", L"overlay", L"overlay.dll" };
inline std::vector<std::string> blockOverlayNames = { "eosovh-win32-shipping.dll", "eosovh-win32-shipping", "eosovh-win64-shipping.dll", "eosovh-win64-shipping",
"gameoverlayrenderer64", "gameoverlayrenderer64.dll", "gameoverlayrenderer", "gameoverlayrenderer.dll",
"owclient.dll", "owclient"
"galaxy.dll", "galaxy", "galaxy64.dll", "galaxy64",
"discordoverlay.dll", "discordoverlay", "discordoverlay64.dll", "discordoverlay64",
"overlay64", "overlay64.dll", "overlay", "overlay.dll" };
inline std::vector<std::wstring> blockOverlayNamesW = { L"eosovh-win32-shipping.dll", L"eosovh-win32-shipping", L"eosovh-win64-shipping.dll", L"eosovh-win64-shipping",
L"gameoverlayrenderer64", L"gameoverlayrenderer64.dll", L"gameoverlayrenderer", L"gameoverlayrenderer.dll",
L"owclient.dll", L"owclient"
L"owclient.dll", L"owclient",
L"galaxy.dll", L"galaxy", L"galaxy64.dll", L"galaxy64",
L"discordoverlay.dll", L"discordoverlay", L"discordoverlay64.dll", L"discordoverlay64",
L"overlay64", L"overlay64.dll", L"overlay", L"overlay.dll" };
DEFINE_NAME_VECTORS(dx11, "d3d11");
+7 -6
View File
@@ -176,20 +176,21 @@ private:
return loadedBin;
}
// Overlay
if (Config::Instance()->FGDisableOverlays.value_or_default() && CheckDllName(&lcaseLibName, &blockOverlayNames))
{
LOG_DEBUG("Trying to load overlay dll: {}", lcaseLibName);
LOG_DEBUG("Blocking overlay dll: {}", lcaseLibName);
return (HMODULE)1;
}
else if (CheckDllName(&lcaseLibName, &overlayNames))
{
LOG_DEBUG("Overlay dll!");
LOG_DEBUG("Overlay dll: {}", lcaseLibName);
auto module = KernelBaseProxy::LoadLibraryExA_()(lcaseLibName.c_str(), NULL, 0);
if (module != nullptr)
{
if (!_overlayMethodsCalled && DxgiProxy::Module() != nullptr)
if (/*!_overlayMethodsCalled &&*/ DxgiProxy::Module() != nullptr)
{
LOG_INFO("Calling CreateDxgiFactory methods for overlay!");
IDXGIFactory* factory = nullptr;
@@ -517,12 +518,12 @@ private:
if (Config::Instance()->FGDisableOverlays.value_or_default() && CheckDllNameW(&lcaseLibName, &blockOverlayNamesW))
{
LOG_DEBUG("Trying to load overlay dll: {}", wstring_to_string(lcaseLibName));
LOG_DEBUG("Blocking overlay dll: {}", wstring_to_string(lcaseLibName));
return (HMODULE)1;
}
else if (CheckDllNameW(&lcaseLibName, &overlayNamesW))
{
LOG_DEBUG("Overlay dll!");
LOG_DEBUG("Overlay dll: {}", wstring_to_string(lcaseLibName));
// If we hook CreateSwapChainForHwnd & CreateSwapChainForCoreWindow here
// Order of CreateSwapChain calls become
@@ -537,7 +538,7 @@ private:
if (module != nullptr)
{
if (!_overlayMethodsCalled && DxgiProxy::Module() != nullptr)
if (/*!_overlayMethodsCalled && */ DxgiProxy::Module() != nullptr)
{
LOG_INFO("Calling CreateDxgiFactory methods for overlay!");
IDXGIFactory* factory = nullptr;