Skip to content

Commit

Permalink
Pokes.
Browse files Browse the repository at this point in the history
  • Loading branch information
MaddTheSane committed Jan 13, 2024
1 parent 9ebf9b3 commit 1442330
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Boxer.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3468,7 +3468,7 @@
);
path = ADBToolkit;
sourceTree = "<group>";
usesTabs = 0;
usesTabs = 1;
};
9F81CFB613EEA3D7008F0265 /* Disk Images */ = {
isa = PBXGroup;
Expand Down
1 change: 0 additions & 1 deletion Boxer/BXEmulatorErrors.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import "BXEmulatorPrivate.h"
#import "BXEmulator+BXDOSFileSystem.h"
#import "BXDrive.h"
#import "RegexKitLite.h"

#pragma mark -
#pragma mark Private constants
Expand Down
1 change: 0 additions & 1 deletion Boxer/NSWorkspace+BXExecutableTypes.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@


#import "NSWorkspace+BXExecutableTypes.h"
#import "RegexKitLite.h"


#pragma mark -
Expand Down
7 changes: 5 additions & 2 deletions Other Sources/ADBToolkit/ADBHIDEvent.m
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,11 @@ - (void) dispatchHIDEvent: (ADBHIDEvent *)event
{
SEL selector = [self.class delegateMethodForHIDEvent: event];

if (selector && [self respondsToSelector: selector])
[self performSelector: selector withObject: event];
if (selector && [self respondsToSelector: selector]) {
IMP imp = [self methodForSelector:selector];
void (*func)(id, SEL, ADBHIDEvent*) = (void *)imp;
func(self, selector, event);
}
}

#pragma mark - DDHidMouseDelegate methods
Expand Down
16 changes: 10 additions & 6 deletions Other Sources/ADBToolkit/ADBOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,20 @@ - (void) _postNotificationName: (NSString *)name

if ([self.delegate respondsToSelector: selector])
{
if (self.notifiesOnMainThread)
if (self.notifiesOnMainThread) {
[(id)self.delegate performSelectorOnMainThread: selector withObject: notification waitUntilDone: NO];
else
[self.delegate performSelector: selector withObject: notification];
} else {
IMP imp = [(NSObject*)self.delegate methodForSelector: selector];
void (*func)(id, SEL, NSNotification*) = (void *)imp;
func(self.delegate, selector, notification);
}
}

if (self.notifiesOnMainThread)
[center performSelectorOnMainThread: @selector(postNotification:) withObject: notification waitUntilDone: NO];
else
if (self.notifiesOnMainThread) {
[center performSelectorOnMainThread: @selector(postNotification:) withObject: notification waitUntilDone: NO];
} else {
[center postNotification: notification];
}
}

@end

0 comments on commit 1442330

Please sign in to comment.