CS:GO fix for unreleased SteamWorks SDK (untested).

This commit is contained in:
Kyle Sanderson
2016-04-24 16:50:44 -07:00
parent 05a8e4e037
commit ba825b9a6e
3 changed files with 65 additions and 14 deletions
+1 -13
View File
@@ -47,24 +47,12 @@ DETOUR_DECL_STATIC6(SteamGameServer_InitSafeDetour, bool, uint32, unIP, uint16,
SteamWorksGSDetours::SteamWorksGSDetours()
{
#if defined POSIX
const char *pLibSteamPath = "./bin/libsteam_api.so";
#elif defined WIN32_LEAN_AND_MEAN
const char *pLibSteamPath = "./bin/steam_api.dll"; /* Naming from SteamTools. */
#endif
const char *pLibSteamPath = g_SteamWorks.pSWGameServer->GetLibraryPath();
IGameConfig *pConfig = NULL;
if (g_SteamWorks.pSWGameData)
{
pConfig = g_SteamWorks.pSWGameData->GetGameData();
if (pConfig)
{
const char *kvLibSteamAPI = pConfig->GetKeyValue("LibSteamAPI");
if (kvLibSteamAPI)
{
pLibSteamPath = kvLibSteamAPI;
}
}
}
ILibrary *pLibrary = libsys->OpenLibrary(pLibSteamPath, NULL, 0);