From 7933acbabceba8fd826f6505bfeb3ae8baff0a5c Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 17 May 2023 00:01:25 +0100 Subject: Add a hack for features to distinguish VDF loading --- src/sst.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/sst.c') diff --git a/src/sst.c b/src/sst.c index 392f540..fcf26c4 100644 --- a/src/sst.c +++ b/src/sst.c @@ -46,6 +46,8 @@ static int ifacever; // exposing lib handles in general, probably. void *clientlib = 0; +bool sst_earlyloaded = false; // see deferinit() below + #ifdef _WIN32 extern long __ImageBase; // this is actually the PE header struct but don't care #define ownhandle() ((void *)&__ImageBase) @@ -244,6 +246,7 @@ static bool deferinit(void) { // Portal 2 does away with the separate gameui library, so now we just call // CEngineVGui::IsInitialized() which works everywhere. if (VGuiIsInitialized(vgui)) return false; + sst_earlyloaded = true; // let other code know if (!os_mprot(*(void ***)vgui + vtidx_VGuiConnect, sizeof(void *), PAGE_READWRITE)) { errmsg_warnsys("couldn't make CEngineVGui vtable writable for deferred " -- cgit v1.2.3