Skip to content

Commit

Permalink
Fix some warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco committed Apr 25, 2015
1 parent a7f0179 commit 9bcf6b8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions OpenEmu/OEApplicationDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ - (void)libraryDatabaseDidLoad:(NSNotification*)notification
[self bind:@"logHIDEvents" toObject:sudc withKeyPath:@"values.logsHIDEvents" options:nil];
[self bind:@"logKeyboardEvents" toObject:sudc withKeyPath:@"values.logsHIDEventsNoKeyboard" options:nil];

_unhandledEventsMonitor =
[[OEDeviceManager sharedDeviceManager] addUnhandledEventMonitorHandler:
_unhandledEventsMonitor = [[OEDeviceManager sharedDeviceManager] addUnhandledEventMonitorHandler:
^(OEDeviceHandler *handler, OEHIDEvent *event)
{
if(![NSApp isActive] && [event type] == OEHIDEventTypeKeyboard) return;
Expand Down
2 changes: 1 addition & 1 deletion OpenEmu/OEDownload.m
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ - (void)download:(NSURLDownload *)download didReceiveDataOfLength:(NSUInteger)le
double progress = _downloadedLength / (double)_totalDownloadLength;

// Try reducing number callbacks
if(fabsf(progress-_progress) > 0.01)
if(fabs(progress-_progress) > 0.01)
[self setProgress:progress];
}
}
Expand Down
8 changes: 7 additions & 1 deletion OpenEmu/OEMainWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ - (id)initWithWindow:(NSWindow *)window
return self;
}


- (void)awakeFromNib
{
NSWindow *window = [self window];
Expand All @@ -97,7 +98,6 @@ - (void)awakeFromNib

[[self libraryController] setDelegate:self];

[window setWindowController:self];
[window setDelegate:self];

// Setup Window behavior
Expand Down Expand Up @@ -142,6 +142,12 @@ - (NSString *)windowNibName
{
return @"MainWindow";
}

- (void)windowDidLoad
{
NSLog(@"window did load");
}

#pragma mark -
// ugly hack, remove
- (void)startGame:(OEDBGame*)game
Expand Down
4 changes: 2 additions & 2 deletions OpenEmu/OEMenuView.m
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ - (void)OE_layoutIfNeeded
v1 = NSMinX(arrowRect);
v2 = NSMaxX(arrowRect);
}
arrowRect.origin.y = attachedPoint.y - floor((abs(_backgroundEdgeInsets.top - _backgroundEdgeInsets.bottom) + arrowRect.size.height) / 2.0);
arrowRect.origin.y = attachedPoint.y - floor((fabs(_backgroundEdgeInsets.top - _backgroundEdgeInsets.bottom) + arrowRect.size.height) / 2.0);

point1 = NSMakePoint(v1, NSMinY(arrowRect));
point2 = NSMakePoint(v2, floor(NSMidY(arrowRect)));
Expand All @@ -878,7 +878,7 @@ - (void)OE_layoutIfNeeded
v1 = NSMinY(arrowRect);
v2 = NSMaxY(arrowRect);
}
arrowRect.origin.x = attachedPoint.x - floor((abs(_backgroundEdgeInsets.left - _backgroundEdgeInsets.right) + arrowRect.size.width) / 2.0);
arrowRect.origin.x = attachedPoint.x - floor((fabs(_backgroundEdgeInsets.left - _backgroundEdgeInsets.right) + arrowRect.size.width) / 2.0);

point1 = NSMakePoint(NSMinX(arrowRect), v1);
point2 = NSMakePoint(floor(NSMidX(arrowRect)), v2);
Expand Down

0 comments on commit 9bcf6b8

Please sign in to comment.