diff --git a/template/Macros.h b/template/Macros.h index 2105296..9ce6c19 100644 --- a/template/Macros.h +++ b/template/Macros.h @@ -11,7 +11,6 @@ #include #include -#include // definition at Menu.h extern Menu *menu; @@ -23,9 +22,9 @@ extern Switches *switches; #define HOOK_NO_ORIG(offset, ptr) MSHookFunction((void *)getRealOffset(offset), (void *)ptr, NULL) // Note to not prepend an underscore to the symbol. See Notes on the Apple manpage (https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man3/dlsym.3.html) -#define HOOKSYM(sym, ptr, org) MSHookFunction((void*)dlsym((void *)-2, sym), (void *)ptr, (void **)&org) -#define HOOKSYM_NO_ORIG(sym, ptr) MSHookFunction((void*)dlsym((void *)-2, sym), (void *)ptr, NULL) -#define getSym(symName) dlsym((void *)-2, symName) +#define HOOKSYM(sym, ptr, org) MSHookFunction((void*)dlsym((void *)RTLD_DEFAULT, sym), (void *)ptr, (void **)&org) +#define HOOKSYM_NO_ORIG(sym, ptr) MSHookFunction((void*)dlsym((void *)RTLD_DEFAULT, sym), (void *)ptr, NULL) +#define getSym(symName) dlsym((void *)RTLD_DEFAULT, symName) // Convert hex color to UIColor, usage: For the color #BD0000 you'd use: UIColorFromHex(0xBD0000) #define UIColorFromHex(hexColor) [UIColor colorWithRed:((float)((hexColor & 0xFF0000) >> 16))/255.0 green:((float)((hexColor & 0xFF00) >> 8))/255.0 blue:((float)(hexColor & 0xFF))/255.0 alpha:1.0] diff --git a/template/versionCheck.sh b/template/versionCheck.sh index 851431a..f1d0e13 100755 --- a/template/versionCheck.sh +++ b/template/versionCheck.sh @@ -1,5 +1,5 @@ #!/bin/bash -VERSION='0.6.9' +VERSION='0.7.0' # Don't remove the above line. Serves as the version this script will fetch. Only update when a new version is out. ERROR='\033[1;31m[*] Error:\033[1;37m '