Kaynağa Gözat

Fixes a 10.7 bug in which locationID is returned as a signed integer

Brandon Slack 13 yıl önce
ebeveyn
işleme
bc3d206147
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      gameplay/src/PlatformMacOSX.mm

+ 2 - 1
gameplay/src/PlatformMacOSX.mm

@@ -362,7 +362,8 @@ double getMachTimeInMilliseconds()
 }
 - (NSNumber*)locationID
 {
-    return (NSNumber*)IOHIDDeviceGetProperty([self rawDevice], CFSTR(kIOHIDLocationIDKey));
+    NSNumber *n = (NSNumber*)IOHIDDeviceGetProperty([self rawDevice], CFSTR(kIOHIDLocationIDKey));
+    return [NSNumber numberWithUnsignedInt:[n unsignedIntValue]];
 }
 
 - (void)initializeGamepadElements