Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/geode-sdk/geode
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Nov 21, 2023
2 parents f796224 + c5550a6 commit df3979f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ namespace geode {

namespace {
// to make sure the instance is set into the sharedMod<> in load time
static auto mod = geode::getMod();
static auto mod = geode::getMod();
}
2 changes: 1 addition & 1 deletion loader/src/load.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ using namespace geode::prelude;
int geodeEntry(void* platformData) {
log::Logger::setup();

log::info("Entry");
log::info("Running {} {}", Mod::get()->getName(), Mod::get()->getVersion());

auto begin = std::chrono::high_resolution_clock::now();

Expand Down
6 changes: 5 additions & 1 deletion loader/src/loader/ModImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,11 @@ Mod* Loader::Impl::getInternalMod() {
auto& mod = Mod::sharedMod<>;
if (mod)
return mod;
if (m_mods.contains("geode.loader")) {
log::warn("Something went wrong and Mod::sharedMod<> got unset after the internal mod was created! Setting sharedMod back...");
mod = m_mods["geode.loader"];
return mod;
}
auto infoRes = getModImplInfo();
if (!infoRes) {
LoaderImpl::get()->platformMessageBox(
Expand All @@ -643,7 +648,6 @@ Mod* Loader::Impl::getInternalMod() {
}
mod->m_impl->m_enabled = true;
m_mods.insert({ mod->getID(), mod });
log::debug("Created internal mod {}", mod->getName());
return mod;
}

Expand Down

0 comments on commit df3979f

Please sign in to comment.