Skip to content

Instantly share code, notes, and snippets.

@janodev
Created November 26, 2014 19:30
Show Gist options
  • Save janodev/c1d03e34c9fffcf3529d to your computer and use it in GitHub Desktop.
Save janodev/c1d03e34c9fffcf3529d to your computer and use it in GitHub Desktop.
Use chrome.sh to launch a stable patched Chrome from the terminal. See https://devforums.apple.com/message/1076597#1076597
clang -dynamiclib -framework AppKit patch.m -o patch.dylib
env DYLD_INSERT_LIBRARIES=patch.dylib "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
#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