mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-31 07:45:48 -04:00
Allow code mods to be disabled on build, disable them by default for now.
This commit is contained in:
@@ -412,6 +412,11 @@ static bool checkDuplicateMod(const ModMetadata& metadata, const std::vector<Loa
|
||||
}
|
||||
|
||||
bool ModLoader::tryLoadNativeMod(LoadedMod& mod) {
|
||||
if (!EnableCodeMods) {
|
||||
DuskLog.error("Code mods are not available in this build");
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
auto [dllEntry, dllFallback] = LocateDllInBundle(*mod.bundle);
|
||||
|
||||
@@ -3,8 +3,18 @@
|
||||
#include <filesystem>
|
||||
#include "miniz.h"
|
||||
|
||||
#if __APPLE__
|
||||
#include <TargetConditionals.h>
|
||||
#endif
|
||||
|
||||
namespace dusk::modding {
|
||||
|
||||
#if DUSK_CODE_MODS
|
||||
constexpr bool EnableCodeMods = true;
|
||||
#else
|
||||
constexpr bool EnableCodeMods = false;
|
||||
#endif
|
||||
|
||||
class ModBundle {
|
||||
public:
|
||||
virtual ~ModBundle() = default;
|
||||
|
||||
Reference in New Issue
Block a user