File tree Expand file tree Collapse file tree 4 files changed +12
-15
lines changed
Expand file tree Collapse file tree 4 files changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ namespace SFSE
1818 const char * logPattern{ nullptr };
1919 bool trampoline{ false };
2020 std::size_t trampolineSize{ 0 };
21- bool trampolineSFSE{ true };
2221 bool hook{ true };
2322 };
2423
@@ -42,7 +41,8 @@ namespace SFSE
4241
4342namespace SFSE
4443{
44+ // DEPRECATED
4545 void Init (const LoadInterface* a_intfc, bool a_log) noexcept ;
46-
46+ // DEPRECATED
4747 void AllocTrampoline (std::size_t a_size, bool a_trySFSEReserve = true ) noexcept ;
4848}
Original file line number Diff line number Diff line change @@ -344,6 +344,10 @@ namespace SFSE
344344 static_assert (sizeof (PluginVersionData) == 0x25C );
345345}
346346
347- #define SFSEPluginPreload (...) extern " C" [[maybe_unused]] __declspec(dllexport) bool SFSEPlugin_Preload (__VA_ARGS__)
348- #define SFSEPluginLoad (...) extern " C" [[maybe_unused]] __declspec(dllexport) bool SFSEPlugin_Load (__VA_ARGS__)
349- #define SFSEPluginVersion extern " C" [[maybe_unused]] __declspec(dllexport) constinit SFSE::PluginVersionData SFSEPlugin_Version
347+ #define SFSE_EXPORT extern " C" [[maybe_unused]] __declspec(dllexport)
348+ #define SFSE_PLUGIN_PRELOAD (...) SFSE_EXPORT bool SFSEPlugin_Preload (__VA_ARGS__)
349+ #define SFSE_PLUGIN_LOAD (...) SFSE_EXPORT bool SFSEPlugin_Load (__VA_ARGS__)
350+ #define SFSE_PLUGIN_VERSION SFSE_EXPORT constinit SFSE::PluginVersionData SFSEPlugin_Version
351+ #define SFSEPluginPreload OBSE_PLUGIN_PRELOAD
352+ #define SFSEPluginLoad OBSE_PLUGIN_LOAD
353+ #define SFSEPluginVersion OBSE_PLUGIN_VERSION
Original file line number Diff line number Diff line change @@ -108,8 +108,7 @@ namespace SFSE
108108 }
109109
110110 auto & trampoline = REL::GetTrampoline ();
111- if (const auto intfc = GetTrampolineInterface ();
112- intfc && info.trampolineSFSE ) {
111+ if (const auto intfc = GetTrampolineInterface ()) {
113112 if (const auto mem = intfc->AllocateFromBranchPool (info.trampolineSize ))
114113 trampoline.set_trampoline (mem, info.trampolineSize );
115114 else
@@ -250,12 +249,11 @@ namespace SFSE
250249 Init (a_intfc, { .log = a_log });
251250 }
252251
253- void AllocTrampoline (std::size_t a_size, bool a_trySFSEReserve ) noexcept
252+ void AllocTrampoline (std::size_t a_size, bool ) noexcept
254253 {
255254 auto api = Impl::API::GetSingleton ();
256255 api->info .trampoline = true ;
257256 api->info .trampolineSize = a_size;
258- api->info .trampolineSFSE = a_trySFSEReserve;
259257 api->InitTrampoline ();
260258 }
261259}
Original file line number Diff line number Diff line change 1515
1616local PLUGIN_FILE = [[
1717#include <SFSE/SFSE.h>
18- #include <REL/Relocation.h>
19-
20- using namespace std::literals;
21-
22- extern "C" __declspec(dllexport)
23- constinit auto SFSEPlugin_Version = []() noexcept {
18+ SFSE_EXPORT constinit auto SFSEPlugin_Version = []() noexcept {
2419 SFSE::PluginVersionData v{};
2520 v.PluginVersion({ ${PLUGIN_VERSION_MAJOR}, ${PLUGIN_VERSION_MINOR}, ${PLUGIN_VERSION_PATCH} });
2621 v.PluginName("${PLUGIN_NAME}");
You can’t perform that action at this time.
0 commit comments