forked from alterware/iw6-mod
		
	maint: disable some Steam integration features
This commit is contained in:
		@@ -72,14 +72,18 @@ namespace steam_proxy
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
#ifdef LOAD_STEAM_OVERLAY
 | 
			
		||||
		[[nodiscard]] const utils::nt::library& get_overlay_module() const
 | 
			
		||||
		{
 | 
			
		||||
			return steam_overlay_module_;
 | 
			
		||||
		}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
	private:
 | 
			
		||||
		utils::nt::library steam_client_module_{};
 | 
			
		||||
#ifdef LOAD_STEAM_OVERLAY
 | 
			
		||||
		utils::nt::library steam_overlay_module_{};
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
		steam::interface client_engine_{};
 | 
			
		||||
		steam::interface client_user_{};
 | 
			
		||||
@@ -109,7 +113,9 @@ namespace steam_proxy
 | 
			
		||||
 | 
			
		||||
			utils::nt::library::load(steam_path / "tier0_s64.dll");
 | 
			
		||||
			utils::nt::library::load(steam_path / "vstdlib_s64.dll");
 | 
			
		||||
#ifdef LOAD_STEAM_OVERLAY
 | 
			
		||||
			this->steam_overlay_module_ = utils::nt::library::load(steam_path / "gameoverlayrenderer64.dll");
 | 
			
		||||
#endif
 | 
			
		||||
			this->steam_client_module_ = utils::nt::library::load(steam_path / "steamclient64.dll");
 | 
			
		||||
			if (!this->steam_client_module_) return;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -82,6 +82,9 @@ namespace steam
 | 
			
		||||
				result_handlers_[result.call]->run(result.data, false, result.call);
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			// Reportedly this can cause issues and crashes. Considering the great lack of any Steam features in this client disabling this
 | 
			
		||||
			// shouldn't be a problem
 | 
			
		||||
#if 0
 | 
			
		||||
			for (const auto& callback : callback_list_)
 | 
			
		||||
			{
 | 
			
		||||
				if (callback && callback->get_i_callback() == result.type)
 | 
			
		||||
@@ -89,10 +92,11 @@ namespace steam
 | 
			
		||||
					callback->run(result.data, false, 0);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
			if (result.data)
 | 
			
		||||
			{
 | 
			
		||||
				free(result.data);
 | 
			
		||||
				std::free(result.data);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
@@ -149,14 +153,12 @@ namespace steam
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			HKEY reg_key;
 | 
			
		||||
			if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\WOW6432Node\\Valve\\Steam", 0, KEY_QUERY_VALUE,
 | 
			
		||||
				®_key) ==
 | 
			
		||||
				ERROR_SUCCESS)
 | 
			
		||||
			if (RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\WOW6432Node\\Valve\\Steam", 0, KEY_QUERY_VALUE, ®_key) == ERROR_SUCCESS)
 | 
			
		||||
			{
 | 
			
		||||
				char path[MAX_PATH] = { 0 };
 | 
			
		||||
				char path[MAX_PATH]{};
 | 
			
		||||
				DWORD length = sizeof(path);
 | 
			
		||||
				RegQueryValueExA(reg_key, "InstallPath", nullptr, nullptr, reinterpret_cast<BYTE*>(path),
 | 
			
		||||
					&length);
 | 
			
		||||
				                 &length);
 | 
			
		||||
				RegCloseKey(reg_key);
 | 
			
		||||
 | 
			
		||||
				install_path = path;
 | 
			
		||||
@@ -165,7 +167,6 @@ namespace steam
 | 
			
		||||
			return install_path.data();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		bool SteamGameServer_Init()
 | 
			
		||||
		{
 | 
			
		||||
			return true;
 | 
			
		||||
@@ -179,7 +180,6 @@ namespace steam
 | 
			
		||||
		{
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		friends* SteamFriends()
 | 
			
		||||
		{
 | 
			
		||||
			static friends friends;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user