From 97153b80669e38cfb19a28e9c5acfe97f7d5ce8f Mon Sep 17 00:00:00 2001 From: Oleksandr Nemesh Date: Mon, 22 Apr 2024 01:06:31 +0300 Subject: [PATCH] ifdef manual hooks --- src/geode/hooks/ChannelControl.cpp | 4 +++- src/geode/hooks/GJBaseGameLayer.cpp | 2 ++ src/geode/hooks/MainGameLayer.cpp | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/geode/hooks/ChannelControl.cpp b/src/geode/hooks/ChannelControl.cpp index 097f309..e0b0601 100644 --- a/src/geode/hooks/ChannelControl.cpp +++ b/src/geode/hooks/ChannelControl.cpp @@ -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); -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/geode/hooks/GJBaseGameLayer.cpp b/src/geode/hooks/GJBaseGameLayer.cpp index 4e312eb..12eb7f7 100644 --- a/src/geode/hooks/GJBaseGameLayer.cpp +++ b/src/geode/hooks/GJBaseGameLayer.cpp @@ -30,6 +30,7 @@ namespace openhack::hooks { }; } +#ifdef PLATFORM_WINDOWS $execute { (void) geode::Mod::get()->hook( (void *) gd::findOffset("GJBaseGameLayer::processCommands"), @@ -37,3 +38,4 @@ namespace openhack::hooks { "GJBaseGameLayer::processCommands", tulip::hook::TulipConvention::Thiscall); } +#endif diff --git a/src/geode/hooks/MainGameLayer.cpp b/src/geode/hooks/MainGameLayer.cpp index 38609ae..989a654 100644 --- a/src/geode/hooks/MainGameLayer.cpp +++ b/src/geode/hooks/MainGameLayer.cpp @@ -18,6 +18,7 @@ namespace openhack::hooks::MenuGameLayerHook { }; } +#ifdef PLATFORM_WINDOWS $execute { (void) geode::Mod::get()->hook( (void *) gd::findOffset("MenuGameLayer::tryJump"), @@ -25,4 +26,4 @@ namespace openhack::hooks::MenuGameLayerHook { "MenuGameLayer::tryJump", tulip::hook::TulipConvention::Thiscall); } - +#endif