mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-18 11:54:14 +01:00
usermessage code works on linux again (used ds's suggestion)
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40488
This commit is contained in:
parent
6731f6dabc
commit
abc90fa8c2
@ -518,7 +518,24 @@ bool CacheUserMessages()
|
||||
#endif
|
||||
}
|
||||
|
||||
if (dict)
|
||||
#if !defined OS_WIN32
|
||||
if (dict == NULL)
|
||||
{
|
||||
char path[255];
|
||||
if (GetFileOfAddress(vfunc, path, sizeof(path)))
|
||||
{
|
||||
void *handle = dlopen(path, RTLD_NOW);
|
||||
if (handle != NULL)
|
||||
{
|
||||
void *addr = dlsym(handle, "usermessages");
|
||||
dict = (UserMsgDict *)*(void **)addr;
|
||||
dlclose(handle);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (dict != NULL)
|
||||
{
|
||||
int msg_count = dict->Count();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user