Rework the build and CI: swap to SourceMod's safetyhook-based CDetour and drop the vendored CDetour/asm sources, the old Makefile, Travis config, and buildbot perl scripts. Add GitHub Actions building and releasing x86 and x86_64 against SM 1.12 and 1.13, plus dependabot. Split the Windows and Linux packages and tidy naming. Gate IPluginManager::FindPluginByContext on the extension API version so the extension builds against both SM 1.12 (API 8) and 1.13 (API 9), and shim DETOUR_CREATE_STATIC_FIXED over the address overload safetyhook exposes. Deprecate SteamWorks_ForceHeartbeat: newer Steamworks SDKs removed ISteamGameServer::ForceHeartbeat, so make the native a no-op and mark it deprecated in the include.
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
/*
|
|
This file is part of SourcePawn SteamWorks.
|
|
|
|
SourcePawn SteamWorks is free software: you can redistribute it and/or modify
|
|
it under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, as per version 3 of the License.
|
|
|
|
SourcePawn SteamWorks is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
GNU General Public License for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with SourcePawn SteamWorks. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
Author: Kyle Sanderson (KyleS).
|
|
*/
|
|
|
|
#pragma once
|
|
#include "smsdk_ext.h"
|
|
#include "steam_gameserver.h"
|
|
#include "CDetour/detours.h"
|
|
|
|
/* SourceMod's safetyhook-based CDetour doesn't ship the "fixed address" helper the
|
|
old vendored copy had, so define it in terms of the address overload it does expose. */
|
|
#ifndef DETOUR_CREATE_STATIC_FIXED
|
|
#define DETOUR_CREATE_STATIC_FIXED(name, address) CDetourManager::CreateDetour(GET_STATIC_CALLBACK(name), GET_STATIC_TRAMPOLINE(name), address);
|
|
#endif
|
|
|
|
class SteamWorksGSDetours
|
|
{
|
|
public:
|
|
SteamWorksGSDetours();
|
|
~SteamWorksGSDetours();
|
|
|
|
private:
|
|
CDetour *m_pSafeInitDetour;
|
|
CDetour *m_pShutdownDetour;
|
|
};
|
|
|
|
#include "extension.h"
|