mirror of
https://github.com/geode-sdk/geode.git
synced 2025-02-17 00:30:26 -05:00
Merge branch 'main' of https://github.com/geode-sdk/geode
This commit is contained in:
commit
409815acb3
3 changed files with 6 additions and 13 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
1.1.0
|
||||
1.1.1
|
||||
|
|
|
@ -281,10 +281,10 @@ namespace geode {
|
|||
into = std::move(GEODE_CONCAT(unwrap_res_, __LINE__).unwrap())
|
||||
|
||||
#define GEODE_UNWRAP(...) \
|
||||
{ \
|
||||
do { \
|
||||
auto GEODE_CONCAT(unwrap_res_, __LINE__) = (__VA_ARGS__); \
|
||||
if (GEODE_CONCAT(unwrap_res_, __LINE__).isErr()) { \
|
||||
return geode::Err(std::move(GEODE_CONCAT(unwrap_res_, __LINE__).unwrapErr())); \
|
||||
} \
|
||||
}
|
||||
} while(false)
|
||||
}
|
||||
|
|
|
@ -345,9 +345,7 @@ Result<> Mod::Impl::loadBinary() {
|
|||
|
||||
LoaderImpl::get()->releaseNextMod();
|
||||
|
||||
Loader::get()->queueInGDThread([&]() {
|
||||
ModStateEvent(m_self, ModEventType::Loaded).post();
|
||||
});
|
||||
ModStateEvent(m_self, ModEventType::Loaded).post();
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
@ -390,10 +388,8 @@ Result<> Mod::Impl::enable() {
|
|||
}
|
||||
}
|
||||
|
||||
Loader::get()->queueInGDThread([&]() {
|
||||
ModStateEvent(m_self, ModEventType::Enabled).post();
|
||||
});
|
||||
m_enabled = true;
|
||||
ModStateEvent(m_self, ModEventType::Enabled).post();
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
@ -421,10 +417,6 @@ Result<> Mod::Impl::disable() {
|
|||
if (!disabledDependants)
|
||||
return Err("Mod cannot be disabled because one or more of its dependants cannot be disabled.");
|
||||
|
||||
Loader::get()->queueInGDThread([&]() {
|
||||
ModStateEvent(m_self, ModEventType::Disabled).post();
|
||||
});
|
||||
|
||||
std::vector<std::string> errors;
|
||||
for (auto const& hook : m_hooks) {
|
||||
auto res = this->disableHook(hook);
|
||||
|
@ -438,6 +430,7 @@ Result<> Mod::Impl::disable() {
|
|||
}
|
||||
|
||||
m_enabled = false;
|
||||
ModStateEvent(m_self, ModEventType::Disabled).post();
|
||||
|
||||
if (!errors.empty())
|
||||
return Err(utils::string::join(errors, "\n"));
|
||||
|
|
Loading…
Reference in a new issue