fix currently loading crashlog

This commit is contained in:
altalk23 2024-02-04 14:42:22 +03:00
parent f832cc5145
commit e95d454b45
2 changed files with 3 additions and 2 deletions

View file

@ -41,10 +41,10 @@ void crashlog::printMods(std::stringstream& stream) {
using namespace std::string_view_literals;
for (auto& mod : mods) {
stream << fmt::format("{} | [{}] {}\n",
ModImpl::getImpl(mod)->isCurrentlyLoading() ? "o"sv :
mod->isEnabled() ? "x"sv :
ModImpl::getImpl(mod)->hasProblems() ? "!"sv : // thank you for this bug report
mod->shouldLoad() ? "~"sv :
ModImpl::getImpl(mod)->isCurrentlyLoading() ? "o"sv :
" "sv,
mod->getVersion().toString(), mod->getID()
);

View file

@ -385,7 +385,6 @@ Result<> Mod::Impl::loadBinary() {
log::error("Failed to load binary for mod {}: {}", m_metadata.getID(), res.unwrapErr());
return res;
}
m_isCurrentlyLoading = false;
LoaderImpl::get()->releaseNextMod();
@ -393,6 +392,8 @@ Result<> Mod::Impl::loadBinary() {
ModStateEvent(m_self, ModEventType::Loaded).post();
ModStateEvent(m_self, ModEventType::Enabled).post();
m_isCurrentlyLoading = false;
return Ok();
}