mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-25 04:11:42 -04:00
update tuliphook version
This commit is contained in:
parent
7f52356955
commit
8a9a183e08
4 changed files with 12 additions and 23 deletions
|
@ -123,7 +123,7 @@ CPMAddPackage("gh:fmtlib/fmt#9.1.0")
|
|||
CPMAddPackage("gh:gulrak/filesystem#3e5b930")
|
||||
|
||||
# Tulip hook (hooking)
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook#fd27e4a")
|
||||
CPMAddPackage("gh:geode-sdk/TulipHook#52052be")
|
||||
|
||||
target_link_libraries(${PROJECT_NAME} INTERFACE ghc_filesystem fmt TulipHookInclude GeodeCodegenSources)
|
||||
|
||||
|
|
|
@ -135,7 +135,7 @@ namespace geode {
|
|||
void addInternalHook(Hook* hook, Mod* mod);
|
||||
|
||||
Mod* createInternalMod();
|
||||
void setupInternalMod();
|
||||
Result<> setupInternalMod();
|
||||
};
|
||||
|
||||
class LoaderImpl {
|
||||
|
|
|
@ -678,9 +678,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();
|
||||
}
|
||||
|
|
|
@ -154,18 +154,6 @@ $execute {
|
|||
int geodeEntry(void* platformData) {
|
||||
// setup internals
|
||||
|
||||
auto intModSetupRes = ModImpl::getImpl(Mod::get())->setup();
|
||||
if (!intModSetupRes) {
|
||||
LoaderImpl::get()->platformMessageBox(
|
||||
"Unable to load Geode!",
|
||||
"There was an unknown fatal error setting up "
|
||||
"the internal mod representation and Geode can "
|
||||
"not be loaded. "
|
||||
"(" + intModSetupRes.unwrapErr() + ")"
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (!geode::core::hook::initialize()) {
|
||||
LoaderImpl::get()->platformMessageBox(
|
||||
"Unable to load Geode!",
|
||||
|
@ -177,22 +165,26 @@ int geodeEntry(void* platformData) {
|
|||
}
|
||||
|
||||
// set up internal mod, settings and data
|
||||
if (!LoaderImpl::get()->setupInternalMod()) {
|
||||
auto setupIntMod = LoaderImpl::get()->setupInternalMod();
|
||||
if (!setupIntMod) {
|
||||
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. "
|
||||
"(" + setupIntMod.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 "
|
||||
"the loader and Geode can not be loaded." + setupRes.unwrapErr()
|
||||
"the loader and Geode can not be loaded. "
|
||||
"(" + setupRes.unwrapErr() + ")"
|
||||
);
|
||||
LoaderImpl::get()->reset();
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Reference in a new issue