fixed typos in messsage processing

fixed loadlibrary code
fixed game identification in chatter
This commit is contained in:
jeefo 2016-03-13 11:58:35 +03:00
commit 730ce7a1d4
5 changed files with 32 additions and 29 deletions

View file

@ -137,18 +137,21 @@ public:
return m_ptr;
}
inline void *GetFuncAddr (const char *function)
template <typename R> R GetFuncAddr (const char *function)
{
if (!IsLoaded ())
return NULL;
#ifdef PLATFORM_WIN32
return reinterpret_cast <void *> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
return reinterpret_cast <R> (GetProcAddress (static_cast <HMODULE> (m_ptr), function));
#else
return reinterpret_cast <void *> (dlsym (m_ptr, function));
return reinterpret_cast <R> (dlsym (m_ptr, function));
#endif
}
inline void *GetHandle (void)
template <typename R> R GetHandle (void)
{
return m_ptr;
return (R) m_ptr;
}
inline bool IsLoaded (void) const