fix: crash when exiting linux listen server (#241)
fix: crash when loading on windows xp (#244) build: switched to github hosted runners, and get rid of self-hosted build: windows exe and dll is now code-signed build: drop support for intel icc compiler
This commit is contained in:
parent
c5bdc8dfec
commit
1e9bc3cb5f
9 changed files with 456 additions and 287 deletions
22
inc/engine.h
22
inc/engine.h
|
|
@ -643,10 +643,12 @@ class EntityLinkage : public Singleton <EntityLinkage> {
|
|||
private:
|
||||
#if defined (CR_WINDOWS)
|
||||
# define DLSYM_FUNCTION GetProcAddress
|
||||
# define DLCLOSE_FUNCTION FreeLibrary
|
||||
# define DLSYM_RETURN FARPROC
|
||||
# define DLSYM_HANDLE HMODULE
|
||||
#else
|
||||
# define DLSYM_FUNCTION dlsym
|
||||
# define DLCLOSE_FUNCTION dlclose
|
||||
# define DLSYM_RETURN SharedLibrary::Handle
|
||||
# define DLSYM_HANDLE SharedLibrary::Handle
|
||||
#endif
|
||||
|
|
@ -655,6 +657,7 @@ private:
|
|||
bool m_paused { false };
|
||||
|
||||
Detour <decltype (DLSYM_FUNCTION)> m_dlsym;
|
||||
Detour <decltype (DLCLOSE_FUNCTION)> m_dlclose;
|
||||
HashMap <StringRef, DLSYM_RETURN> m_exports;
|
||||
|
||||
SharedLibrary m_self;
|
||||
|
|
@ -666,6 +669,15 @@ public:
|
|||
void initialize ();
|
||||
DLSYM_RETURN lookup (SharedLibrary::Handle module, const char *function);
|
||||
|
||||
int close (DLSYM_HANDLE module) {
|
||||
if (m_self.handle () == module) {
|
||||
disable ();
|
||||
|
||||
return m_dlclose (module);
|
||||
}
|
||||
return m_dlclose (module);
|
||||
}
|
||||
|
||||
public:
|
||||
void callPlayerFunction (edict_t *ent) {
|
||||
#if defined (CR_ANDROID) && defined (CR_ARCH_ARM)
|
||||
|
|
@ -699,16 +711,20 @@ public:
|
|||
}
|
||||
|
||||
public:
|
||||
static DLSYM_RETURN CR_STDCALL replacement (SharedLibrary::Handle module, const char *function) {
|
||||
static DLSYM_RETURN CR_STDCALL lookupHandler (SharedLibrary::Handle module, const char *function) {
|
||||
return EntityLinkage::instance ().lookup (module, function);
|
||||
}
|
||||
|
||||
static int CR_STDCALL closeHandler (DLSYM_HANDLE module) {
|
||||
return EntityLinkage::instance ().close (module);
|
||||
}
|
||||
|
||||
public:
|
||||
void clearExportTable () {
|
||||
void flush () {
|
||||
m_exports.clear ();
|
||||
}
|
||||
|
||||
bool isWorkaroundNeeded () {
|
||||
bool needsBypass () const {
|
||||
return !plat.win && !Game::instance ().isDedicated ();
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@
|
|||
|
||||
// generated by meson build system
|
||||
#ifndef MODULE_BUILD_HASH
|
||||
# define MODULE_BUILD_HASH "@commitHash@"
|
||||
# define MODULE_BUILD_AUTHOR @commitAuthor@
|
||||
# define MODULE_BUILD_COUNT "@commitCount@"
|
||||
# define MODULE_BUILD_MACHINE "@buildMachine@"
|
||||
# define MODULE_BUILD_COMPILER "@buildCompiler@"
|
||||
# define MODULE_BOT_VERSION "@buildVersion@"
|
||||
# define MODULE_BOT_VERSION_FILE @buildVersionWin@,@commitCount@
|
||||
# define MODULE_BOT_BUILD_ID "@commitCount@:@commitHash@"
|
||||
# define MODULE_BUILD_HASH "@hash@"
|
||||
# define MODULE_BUILD_AUTHOR @author@
|
||||
# define MODULE_BUILD_COUNT "@count@"
|
||||
# define MODULE_BUILD_MACHINE "@machine@"
|
||||
# define MODULE_BUILD_COMPILER "@compiler@"
|
||||
# define MODULE_BOT_VERSION "@version@"
|
||||
# define MODULE_BOT_VERSION_FILE @version_win@,@count@
|
||||
# define MODULE_BOT_BUILD_ID "@count@:@hash@"
|
||||
#endif
|
||||
|
|
|
|||
12
inc/yapb.h
12
inc/yapb.h
|
|
@ -1147,12 +1147,12 @@ public:
|
|||
template <typename ...Args> void issueCommand (const char *fmt, Args &&...args);
|
||||
};
|
||||
|
||||
#include <config.h>
|
||||
#include <support.h>
|
||||
#include <message.h>
|
||||
#include <engine.h>
|
||||
#include <manager.h>
|
||||
#include <control.h>
|
||||
#include "config.h"
|
||||
#include "support.h"
|
||||
#include "message.h"
|
||||
#include "engine.h"
|
||||
#include "manager.h"
|
||||
#include "control.h"
|
||||
|
||||
// very global convars
|
||||
extern ConVar cv_jasonmode;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue