Skip to content

Instantly share code, notes, and snippets.

@streeter
Last active August 29, 2015 14:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save streeter/c443eeab17683213a9ee to your computer and use it in GitHub Desktop.
Save streeter/c443eeab17683213a9ee to your computer and use it in GitHub Desktop.
Fix running Chrome on Mac OS 10.10.2 (14C68m)
#!/bin/sh
clang -dynamiclib -framework AppKit patch.m -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
#!/bin/sh
env DYLD_INSERT_LIBRARIES=./patch.dylib "/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"
@yllierop
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment