Releases: sc2ad/beatsaber-hook
Releases · sc2ad/beatsaber-hook
Various Updates and Performance Improvements
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)
andLoggerContextObject::Backtrace(uint16_t)
to print backtraces supported byndk-stack
- Avoid allocations in
RunMethod
calls, use stackstd::array
types instead - Use method pointer invokes for
RunMethodThrow
, large performance improvement, potential risks of safety when invoking
Add instance hooks with safety
v2.0.3 Updated qpm.json
Fix for some format logging + SafePtr
v2.0.2 Updated qpm.json
Fix for Byref searches
Uses ExtractIndependentType
from parameter instead of classof
Changed hook installations
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 addressMAKE_HOOK_FIND_VERBOSE
- takes a literalFindMethod
callMAKE_HOOK_FIND
- takes anIl2CppClass*
and method name, callsFindMethod
under the hoodMAKE_HOOK_FIND_CLASS
- takes a namespace name, type name, and method name, callsFindMethod
under the hoodMAKE_HOOK_FIND_CLASS_UNSAFE_INSTANCE
- unsafe variant for instance methodsMAKE_HOOK_FIND_CLASS_UNSAFE_STATIC
- unsafe variant for static methodsMAKE_HOOK_CHECKED_ADDR
- takes a method pointer to check the hook type against, installs to an addressMAKE_HOOK_CHECKED_FIND
- takes a method pointer to check the hook type against, anIl2CppClass*
and method name, callsFindMethod
and installs the hook thereMAKE_HOOK_CHECKED_FIND_CLASS
- takes a method pointer to check the hook type against, a namespace, type name, and method name, callsFindMethod
and installs the hook thereMAKE_HOOK_INSTANCE_FIND
- takes an instance method pointer and a method name. Extracts theIl2CppClass*
from the instance type, callsFindMethod
and ensures the method pointer matches the hook typeMAKE_HOOK_MATCH
- takes a method pointer, obtains theMethodInfo*
from the specialized version of the type (use for codegen methos)MAKE_HOOK_AUTO
- not yet implementedMAKE_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
v1.3.5 Updated qpm.json
Add cast, AssignableFrom to il2cpp_utils
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
v1.3.3 Updated qpm.json
_t
ExtractIndependentType fixes for byref
v1.3.1 Updated qpm.json