source-sdk-2013
source-sdk-2013 copied to clipboard
Windows dedicated server is broken
SteamAPI_Init never gets called so SteamInternal_ContextInit from FileSystem_LoadSearchPaths fails. Can be temporarily mitigated by using ghostinj to load a dll which does the following:
#include <windows.h>
BOOL WINAPI DllMain(
HINSTANCE hinstDLL, // handle to DLL module
DWORD fdwReason, // reason for calling function
LPVOID lpvReserved) // reserved
{
// Perform actions based on the reason for calling.
if (fdwReason == DLL_PROCESS_ATTACH) {
HMODULE steamapi = LoadLibrary(L"steam_api64.dll");
if (steamapi) {
auto proc = GetProcAddress(steamapi, "SteamAPI_Init");
if (proc) {
using fn = bool(*)();
reinterpret_cast<fn>(proc)();
}
}
}
return TRUE; // Successful DLL_PROCESS_ATTACH.
}
what's a ghostinj
what's a ghostinj
https://github.com/perilouswithadollarsign/cstrike15_src/blob/master/dedicated/sys_common.cpp#L57