From c72967abb55cb136bd632fa64b04b00e6270259f Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Sat, 21 Jan 2023 23:07:58 +0300 Subject: [PATCH] fix setup compilation errors --- loader/src/loader/LoaderImpl.hpp | 2 +- loader/src/loader/ModImpl.cpp | 7 ++----- loader/src/main.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/loader/src/loader/LoaderImpl.hpp b/loader/src/loader/LoaderImpl.hpp index c96853db..e0527fbe 100644 --- a/loader/src/loader/LoaderImpl.hpp +++ b/loader/src/loader/LoaderImpl.hpp @@ -135,7 +135,7 @@ namespace geode { void addInternalHook(Hook* hook, Mod* mod); Mod* createInternalMod(); - void setupInternalMod(); + Result<> setupInternalMod(); }; class LoaderImpl { diff --git a/loader/src/loader/ModImpl.cpp b/loader/src/loader/ModImpl.cpp index 38f33736..82c15ea5 100644 --- a/loader/src/loader/ModImpl.cpp +++ b/loader/src/loader/ModImpl.cpp @@ -676,9 +676,6 @@ Mod* Loader::Impl::createInternalMod() { return mod; } -void Loader::Impl::setupInternalMod() { - auto setupRes = Mod::get()->m_impl->setup(); - if (!setupRes) { - log::error("Failed to setup internal mod! ({})", setupRes.unwrapErr()); - } +Result<> Loader::Impl::setupInternalMod() { + return Mod::get()->m_impl->setup(); } \ No newline at end of file diff --git a/loader/src/main.cpp b/loader/src/main.cpp index e4ce0ea5..93f87411 100644 --- a/loader/src/main.cpp +++ b/loader/src/main.cpp @@ -165,18 +165,20 @@ int geodeEntry(void* platformData) { } // set up internal mod, settings and data - if (!LoaderImpl::get()->setupInternalMod()) { + auto internalSetupRes = LoaderImpl::get()->setupInternalMod(); + if (!internalSetupRes) { LoaderImpl::get()->platformMessageBox( "Unable to Load Geode!", "There was an unknown fatal error setting up " - "the internal mod and Geode can not be loaded." + "the internal mod and Geode can not be loaded." + internalSetupRes.unwrapErr() ); LoaderImpl::get()->reset(); return 1; } // set up loader, load mods, etc. - if (!LoaderImpl::get()->setup()) { + auto setupRes = LoaderImpl::get()->setup(); + if (!setupRes) { LoaderImpl::get()->platformMessageBox( "Unable to Load Geode!", "There was an unknown fatal error setting up "