Skip to content

Commit

Permalink
Merge pull request #19 from busmanl30/patch-2
Browse files Browse the repository at this point in the history
Update Macros.h
  • Loading branch information
joeyjurjens authored Sep 6, 2020
2 parents 32cbb0b + af32620 commit 73d990b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions template/Macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <substrate.h>
#include <mach-o/dyld.h>
#include <dlfcn.h>

// definition at Menu.h
extern Menu *menu;
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion template/versionCheck.sh
Original file line number Diff line number Diff line change
@@ -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 '
Expand Down

0 comments on commit 73d990b

Please sign in to comment.