mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-27 01:45:35 -05:00
add debug texts
This commit is contained in:
parent
437a996b14
commit
5c9066618d
3 changed files with 9 additions and 6 deletions
|
@ -45,7 +45,7 @@ tulip::hook::HookMetadata Hook::getHookMetadata() const {
|
|||
}
|
||||
|
||||
void Hook::setHookMetadata(tulip::hook::HookMetadata const& metadata) {
|
||||
m_impl->setHookMetadata(metadata);
|
||||
return m_impl->setHookMetadata(metadata);
|
||||
}
|
||||
|
||||
int32_t Hook::getPriority() const {
|
||||
|
@ -53,7 +53,7 @@ int32_t Hook::getPriority() const {
|
|||
}
|
||||
|
||||
void Hook::setPriority(int32_t priority) {
|
||||
m_impl->setPriority(priority);
|
||||
return m_impl->setPriority(priority);
|
||||
}
|
||||
|
||||
bool Hook::getAutoEnable() const {
|
||||
|
@ -61,12 +61,12 @@ bool Hook::getAutoEnable() const {
|
|||
}
|
||||
|
||||
void Hook::setAutoEnable(bool autoEnable) {
|
||||
m_impl->setAutoEnable(autoEnable);
|
||||
return m_impl->setAutoEnable(autoEnable);
|
||||
}
|
||||
|
||||
Result<> Hook::enable() {
|
||||
m_impl->enable();
|
||||
return m_impl->enable();
|
||||
}
|
||||
Result<> Hook::disable() {
|
||||
m_impl->disable();
|
||||
return m_impl->disable();
|
||||
}
|
|
@ -407,6 +407,7 @@ bool Mod::depends(std::string const& id) const {
|
|||
// Hooks
|
||||
|
||||
Result<> Mod::enableHook(Hook* hook) {
|
||||
log::debug("Enabling hook {} for mod {}", (void*)hook, m_info.id);
|
||||
auto res = hook->enable();
|
||||
if (res) m_hooks.push_back(hook);
|
||||
|
||||
|
@ -423,7 +424,7 @@ Result<Hook*> Mod::addHook(Hook* hook) {
|
|||
auto res = this->enableHook(hook);
|
||||
if (!res) {
|
||||
delete hook;
|
||||
return Err("Can't create hook");
|
||||
return Err("Can't create hook: "+ res.unwrapErr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -147,6 +147,8 @@ static auto $_ = listenForIPC("list-mods", [](IPCEvent* event) -> nlohmann::json
|
|||
int geodeEntry(void* platformData) {
|
||||
// setup internals
|
||||
|
||||
Loader::get()->openPlatformConsole();
|
||||
|
||||
if (!Loader::get()) {
|
||||
LoaderImpl::get()->platformMessageBox(
|
||||
"Unable to Load Geode!",
|
||||
|
|
Loading…
Reference in a new issue