log geode version on startup

This commit is contained in:
ConfiG 2023-11-21 20:34:59 +03:00
parent 954ed1085b
commit c5550a67c2
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B
3 changed files with 7 additions and 3 deletions

View file

@ -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();
}

View file

@ -60,7 +60,7 @@ $execute {
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();

View file

@ -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(
@ -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;
}