mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
log geode version on startup
This commit is contained in:
parent
954ed1085b
commit
c5550a67c2
3 changed files with 7 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue