Skip to content

Commit

Permalink
Support for Apple Silicon (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
artginzburg committed Nov 18, 2021
1 parent ee4fa1c commit 5aca15e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions MiddleClick.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 10102021;
CURRENT_PROJECT_VERSION = 18112021;
DEVELOPMENT_TEAM = R2294BC6J8;
ENABLE_HARDENED_RUNTIME = YES;
FRAMEWORK_SEARCH_PATHS = (
Expand Down Expand Up @@ -250,7 +250,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10102021;
CURRENT_PROJECT_VERSION = 18112021;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = R2294BC6J8;
ENABLE_HARDENED_RUNTIME = YES;
Expand Down
23 changes: 12 additions & 11 deletions MiddleClick/Controller.m
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,14 @@ - (void)start
@"attached devices",
err);
IONotificationPortDestroy(port);
} else {
/// Iterate through all the existing entries to arm the notification.
io_object_t item;
while ((item = IOIteratorNext(handle))) {
CFRelease(item);
}
}
// else {
/// Iterate through all the existing entries to arm the notification. Removed due to: https://stackoverflow.com/questions/1209130/iphone-sdk-exc-bad-access-with-cfrelease-for-abaddressbookref
// io_object_t item;
// while ((item = IOIteratorNext(handle))) {
// CFRelease(item);
// }
// }

// when displays are reconfigured restart of the app is needed, so add a calback to the
// reconifguration of Core Graphics
Expand Down Expand Up @@ -302,11 +303,11 @@ static void restartApp()
void multitouchDeviceAddedCallback(void* _controller,
io_iterator_t iterator)
{
/// Loop through all the returned items.
io_object_t item;
while ((item = IOIteratorNext(iterator))) {
CFRelease(item);
}
/// Loop through all the returned items. Removed due to: https://stackoverflow.com/questions/1209130/iphone-sdk-exc-bad-access-with-cfrelease-for-abaddressbookref
// io_object_t item;
// while ((item = IOIteratorNext(iterator))) {
// CFRelease(item);
// }

NSLog(@"Multitouch device added, restarting...");
Controller* controller = (Controller*)_controller;
Expand Down

0 comments on commit 5aca15e

Please sign in to comment.