1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-11-29 11:24:19 +01:00

Hack to account for Dota server bin name being "libserver".

This commit is contained in:
Nicholas Hastings 2016-07-22 14:03:21 -04:00
parent a2400e3681
commit 18bdaf4732
2 changed files with 10 additions and 2 deletions

View File

@ -73,10 +73,13 @@ static bool g_is_source2 = false;
#define PLATFORM_NAME "osx32" #define PLATFORM_NAME "osx32"
#endif #endif
#elif defined __linux__ #elif defined __linux__
#define SERVER_NAME "server" LIB_SUFFIX
#if defined __amd64__ #if defined __amd64__
// hackhack - source2 uses libserver as name on POSIX, but source1 x64 does not
// (but source1 x64 is also client-only right now so what-ev)
#define SERVER_NAME "libserver" LIB_SUFFIX
#define PLATFORM_NAME "linuxsteamrt64" #define PLATFORM_NAME "linuxsteamrt64"
#else #else
#define SERVER_NAME "server" LIB_SUFFIX
#define PLATFORM_NAME "linuxsteamrt32" #define PLATFORM_NAME "linuxsteamrt32"
#endif #endif
#endif #endif

View File

@ -114,7 +114,12 @@ mm_LoadMetamodLibrary(MetamodBackend backend, char *buffer, size_t maxlength)
return false; return false;
len = strlen(mm_path); len = strlen(mm_path);
temp_len = strlen("server" LIBRARY_EXT);
const char *pLastSlash = strrchr(mm_path, PATH_SEP_CHAR);
if (!pLastSlash)
return false;
temp_len = strlen(&pLastSlash[1]);
if (len < temp_len) if (len < temp_len)
return false; return false;