Skip to content

Releases: sc2ad/beatsaber-hook

Various Updates and Performance Improvements

23 Jul 18:46
Compare
Choose a tag to compare

This release includes:

  • Bump modloader (v1.2.0+) with multi-user support
  • Fix boxed value type return leakage, from il2cpp's runtime_invoke calling invoker methods that always box but never free
  • Add Logger::Backtrace(uint16_t) and LoggerContextObject::Backtrace(uint16_t) to print backtraces supported by ndk-stack
  • Avoid allocations in RunMethod calls, use stack std::array types instead
  • Use method pointer invokes for RunMethodThrow, large performance improvement, potential risks of safety when invoking

Add instance hooks with safety

05 Jul 19:32
Compare
Choose a tag to compare
v2.0.3

Updated qpm.json

Fix for some format logging + SafePtr

04 Jul 22:21
Compare
Choose a tag to compare
v2.0.2

Updated qpm.json

Fix for Byref searches

04 Jul 01:23
Compare
Choose a tag to compare

Uses ExtractIndependentType from parameter instead of classof

Changed hook installations

03 Jul 09:08
Compare
Choose a tag to compare

Okay so I changed pretty much everything to do with hooks. Makes, installs, etc.

There are some really cool new features, though, so you should be happy about this (I promise)
Notably:

  • hook macros are now in utils/hooking.hpp
  • All old MAKE_HOOK macros have been removed, replaced with:
    • MAKE_HOOK - takes an address
    • MAKE_HOOK_FIND_VERBOSE - takes a literal FindMethod call
    • MAKE_HOOK_FIND - takes an Il2CppClass* and method name, calls FindMethod under the hood
    • MAKE_HOOK_FIND_CLASS - takes a namespace name, type name, and method name, calls FindMethod under the hood
    • MAKE_HOOK_FIND_CLASS_UNSAFE_INSTANCE - unsafe variant for instance methods
    • MAKE_HOOK_FIND_CLASS_UNSAFE_STATIC - unsafe variant for static methods
    • MAKE_HOOK_CHECKED_ADDR - takes a method pointer to check the hook type against, installs to an address
    • MAKE_HOOK_CHECKED_FIND - takes a method pointer to check the hook type against, an Il2CppClass* and method name, calls FindMethod and installs the hook there
    • MAKE_HOOK_CHECKED_FIND_CLASS - takes a method pointer to check the hook type against, a namespace, type name, and method name, calls FindMethod and installs the hook there
    • MAKE_HOOK_INSTANCE_FIND - takes an instance method pointer and a method name. Extracts the Il2CppClass* from the instance type, calls FindMethod and ensures the method pointer matches the hook type
    • MAKE_HOOK_MATCH - takes a method pointer, obtains the MethodInfo* from the specialized version of the type (use for codegen methos)
    • MAKE_HOOK_AUTO - not yet implemented
    • MAKE_HOOK_INSTANCE_AUTO - not yet implemented

Also added EventCallback in typedefs-wrappers.hpp, see test code for usage
Also added il2cpp_utils::MethodTypeCheck for finding and confirming validity of MethodInfo* instances

Fix SafePtr bool operator

15 May 18:54
Compare
Choose a tag to compare
v1.3.5

Updated qpm.json

Add cast, AssignableFrom to il2cpp_utils

14 May 21:18
Compare
Choose a tag to compare

Check il2cpp-utils-classes.hpp and typedefs-wrappers.hpp, to see the main takeaways.
Also see typedefs-wrappers.cpp for example code (somewhat applicable).

Fix for ExtractType pointer values

12 Apr 06:01
Compare
Choose a tag to compare
v1.3.3

Updated qpm.json

_t

12 Apr 05:39
Compare
Choose a tag to compare
_t
v1.3.2

Updated qpm.json

ExtractIndependentType fixes for byref

12 Apr 04:59
Compare
Choose a tag to compare
v1.3.1

Updated qpm.json