From 94138f32ad02e2d9b52cb0217555875d8d76dc52 Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Mon, 20 Mar 2023 19:08:42 +0200 Subject: [PATCH] fix hooking callback functions --- bindings/GeometryDash.bro | 2 +- codegen/src/Shared.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/GeometryDash.bro b/bindings/GeometryDash.bro index 972d4d33..6cd5c72e 100644 --- a/bindings/GeometryDash.bro +++ b/bindings/GeometryDash.bro @@ -3692,7 +3692,7 @@ class LevelEditorLayer : GJBaseGameLayer, LevelSettingsDelegate { } void updateOptions() = mac 0x91ed0, win 0x15fcc0; void updateToggledGroups() = mac 0x9bb10; - void updateVisibility(float) = mac 0x92c70, win 0x1632b0; + callback void updateVisibility(float delta) = mac 0x92c70, win 0x1632b0; void groupStickyObjects(cocos2d::CCArray* objects) = mac 0x99dd0, win 0x164860; void ungroupStickyObjects(cocos2d::CCArray* objects) = mac 0x99ee0, win 0x164950; diff --git a/codegen/src/Shared.hpp b/codegen/src/Shared.hpp index 371d868d..d6e414a8 100644 --- a/codegen/src/Shared.hpp +++ b/codegen/src/Shared.hpp @@ -184,7 +184,7 @@ namespace codegen { if (status == BindStatus::Binded) return "tulip::hook::CdeclConvention"; else return "tulip::hook::OptcallConvention"; } - else if (fn->is_virtual) { + else if (fn->is_virtual || fn->is_callback) { return "tulip::hook::ThiscallConvention"; } else { @@ -205,7 +205,7 @@ namespace codegen { if (status == BindStatus::Binded) return "Cdecl"; else return "Optcall"; } - else if (fn->is_virtual) { + else if (fn->is_virtual || fn->is_callback) { return "Thiscall"; } else {