Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed a 32/64 bit conversion warning

  • Loading branch information...
commit 8c2ee2148e6f35674b0b0c7701f0ae306ec230d5 1 parent d02e7a9
@davedelong davedelong authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 DDHotKeyCenter.m
View
8 DDHotKeyCenter.m
@@ -17,7 +17,7 @@
static NSMutableSet * _registeredHotKeys = nil;
static UInt32 _nextHotKeyID = 1;
OSStatus dd_hotKeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void * userData);
-NSUInteger dd_translateModifierFlags(NSUInteger flags);
+UInt32 dd_translateModifierFlags(NSUInteger flags);
NSString* dd_stringifyModifierFlags(NSUInteger flags);
#pragma mark DDHotKey
@@ -122,7 +122,7 @@ - (BOOL) registerHotKey {
keyID.id = _nextHotKeyID;
EventHotKeyRef carbonHotKey;
- NSUInteger flags = dd_translateModifierFlags(modifierFlags);
+ UInt32 flags = dd_translateModifierFlags(modifierFlags);
OSStatus err = RegisterEventHotKey(keyCode, flags, keyID, GetEventDispatcherTarget(), 0, &carbonHotKey);
//error registering hot key
@@ -291,8 +291,8 @@ OSStatus dd_hotKeyHandler(EventHandlerCallRef nextHandler, EventRef theEvent, vo
return noErr;
}
-NSUInteger dd_translateModifierFlags(NSUInteger flags) {
- NSUInteger newFlags = 0;
+UInt32 dd_translateModifierFlags(NSUInteger flags) {
+ UInt32 newFlags = 0;
if ((flags & NSControlKeyMask) > 0) { newFlags |= controlKey; }
if ((flags & NSCommandKeyMask) > 0) { newFlags |= cmdKey; }
if ((flags & NSShiftKeyMask) > 0) { newFlags |= shiftKey; }
Please sign in to comment.
Something went wrong with that request. Please try again.