Merge pull request #3120 from lioncash/osx
InputCommon: Use NSNumber numeric literals in Obj-C code
This commit is contained in:
commit
37825c59dd
|
@ -23,8 +23,8 @@ Joystick::Joystick(IOHIDDeviceRef device, std::string name, int index)
|
||||||
{
|
{
|
||||||
// Buttons
|
// Buttons
|
||||||
NSDictionary *buttonDict = @{
|
NSDictionary *buttonDict = @{
|
||||||
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
|
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Button),
|
||||||
@kIOHIDElementUsagePageKey : [NSNumber numberWithInteger: kHIDPage_Button]
|
@kIOHIDElementUsagePageKey : @(kHIDPage_Button)
|
||||||
};
|
};
|
||||||
|
|
||||||
CFArrayRef buttons = IOHIDDeviceCopyMatchingElements(m_device,
|
CFArrayRef buttons = IOHIDDeviceCopyMatchingElements(m_device,
|
||||||
|
@ -45,7 +45,7 @@ Joystick::Joystick(IOHIDDeviceRef device, std::string name, int index)
|
||||||
|
|
||||||
// Axes
|
// Axes
|
||||||
NSDictionary *axisDict = @{
|
NSDictionary *axisDict = @{
|
||||||
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Misc]
|
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Misc)
|
||||||
};
|
};
|
||||||
|
|
||||||
CFArrayRef axes = IOHIDDeviceCopyMatchingElements(m_device,
|
CFArrayRef axes = IOHIDDeviceCopyMatchingElements(m_device,
|
||||||
|
|
|
@ -23,9 +23,9 @@ Keyboard::Keyboard(IOHIDDeviceRef device, std::string name, int index, void *win
|
||||||
// This class should only recieve Keyboard or Keypad devices
|
// This class should only recieve Keyboard or Keypad devices
|
||||||
// Now, filter on just the buttons we can handle sanely
|
// Now, filter on just the buttons we can handle sanely
|
||||||
NSDictionary *matchingElements = @{
|
NSDictionary *matchingElements = @{
|
||||||
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
|
@kIOHIDElementTypeKey : @(kIOHIDElementTypeInput_Button),
|
||||||
@kIOHIDElementMinKey : [NSNumber numberWithInteger: 0],
|
@kIOHIDElementMinKey : @0,
|
||||||
@kIOHIDElementMaxKey : [NSNumber numberWithInteger: 1]
|
@kIOHIDElementMaxKey : @1
|
||||||
};
|
};
|
||||||
|
|
||||||
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(m_device,
|
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(m_device,
|
||||||
|
|
Loading…
Reference in New Issue