Skip to content

Instantly share code, notes, and snippets.

@ymyzk
Last active August 29, 2015 14:10
Show Gist options
  • Save ymyzk/6e1bb8487b65b18ebbb8 to your computer and use it in GitHub Desktop.
Save ymyzk/6e1bb8487b65b18ebbb8 to your computer and use it in GitHub Desktop.
OS X 10.10.2 Patch
clang -dynamiclib -framework AppKit patch.m -arch i386 -arch x86_64 -o patch.dylib
#import <AppKit/AppKit.h>
__attribute((constructor)) void Patch_10_10_2_entry() {
NSLog(@"10.10.2 patch loaded");
}
@interface NSTouch ()
- (id)_initWithPreviousTouch:(NSTouch *)touch newPhase:(NSTouchPhase)phase position:(CGPoint)position isResting:(BOOL)isResting force:(double)force;
@end
@implementation NSTouch (Patch_10_10_2)
- (id)_initWithPreviousTouch:(NSTouch *)touch newPhase:(NSTouchPhase)phase position:(CGPoint)position isResting:(BOOL)isResting {
return [self _initWithPreviousTouch:touch newPhase:phase position:position isResting:isResting force:0];
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment