core: Add Insurgency support for amd64 Windows (#1295)
* Add basic Insurgency support on Windows x64 This allows SourceMod to load on x64 Insurgency. There are still a lot of variable truncation warnings that have to be dealt with. * Fix 32bit builds * Compile MySQL extension as well The hack for __iob_func being removed from the core runtime, but required by the old mysql we're building against can be simplified a lot due to the `_ReturnAddress` intrinsic available since MSVC 2015. * Don't include the offset we want to extract in the signature
This commit is contained in:
@@ -66,7 +66,12 @@ void InitializeValveGlobals()
|
||||
{
|
||||
return;
|
||||
}
|
||||
#ifdef PLATFORM_X86
|
||||
g_ppGameRules = *reinterpret_cast<void ***>(addr + offset);
|
||||
#else
|
||||
int32_t varOffset = *(int32_t *) ((unsigned char *) addr + offset);
|
||||
g_ppGameRules = *reinterpret_cast<void ***>((unsigned char *) addr + offset + sizeof(int32_t) + varOffset);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user