Loading mods

Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
faumaray committed 2025-10-20 22:04:25 +03:00
1 parent de940dab27
commit 6ea34bf00b
10 files changed
+169 -10

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
#pragma once
#if defined(_WIN32)
# include <Mods/LoadLibraryWin.hpp>
#else
# include <Mods/LoadLibraryUnix.hpp>
#endif
+8
View File
@@ -0,0 +1,8 @@
#pragma once
#include <string>
void* LoadLibrary(const std::string& path, bool isGlobal);
bool CloseLibrary(void* handle);
void* LoadSymbol(void* handle, const std::string& name);
+9
View File
@@ -0,0 +1,9 @@
#pragma once
#if defined(_WIN32)
#include <string>
void* LoadLibrary(const std::string& path, bool isGlobal);
bool CloseLibrary(void* handle);
void* LoadSymbol(void* handle, const std::string& name);
#endif
+1 -1
View File
@@ -13,7 +13,7 @@ class ModLoader {
public:
// Load a module (.so), discover CRTP-registered mod types, instantiate each with Context.
// Returns the number of instances created from this module.
std::size_t loadModule(const std::string& path, const Context& ctx);
std::size_t loadModule(const std::string& path, const Context& ctx, bool isGlobal);
// Start/stop all currently loaded instances.
void startAll();