Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Commit

Permalink
ifdef manual hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Prevter committed Apr 21, 2024
1 parent b571db2 commit 97153b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/geode/hooks/ChannelControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ namespace openhack::hooks::ChannelControl {
}
}

#ifdef PLATFORM_WINDOWS
$execute {
(void) geode::Mod::get()->hook(
(void *) gd::findSignature("FMOD::ChannelControl::setVolume"),
&openhack::hooks::ChannelControl::setVolume,
"FMOD::ChannelControl::setVolume",
tulip::hook::TulipConvention::Stdcall);
}
}
#endif
2 changes: 2 additions & 0 deletions src/geode/hooks/GJBaseGameLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ namespace openhack::hooks {
};
}

#ifdef PLATFORM_WINDOWS
$execute {
(void) geode::Mod::get()->hook(
(void *) gd::findOffset("GJBaseGameLayer::processCommands"),
&openhack::hooks::GJBaseGameLayerHook::processCommands,
"GJBaseGameLayer::processCommands",
tulip::hook::TulipConvention::Thiscall);
}
#endif
3 changes: 2 additions & 1 deletion src/geode/hooks/MainGameLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ namespace openhack::hooks::MenuGameLayerHook {
};
}

#ifdef PLATFORM_WINDOWS
$execute {
(void) geode::Mod::get()->hook(
(void *) gd::findOffset("MenuGameLayer::tryJump"),
&openhack::hooks::MenuGameLayerHook::tryJump,
"MenuGameLayer::tryJump",
tulip::hook::TulipConvention::Thiscall);
}

#endif

0 comments on commit 97153b8

Please sign in to comment.