mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
InputCommon: Initialize NSDictionaries using literal syntax.
This commit is contained in:
@ -23,13 +23,11 @@ Keyboard::Keyboard(IOHIDDeviceRef device, std::string name, int index, void *win
|
||||
{
|
||||
// This class should only recieve Keyboard or Keypad devices
|
||||
// Now, filter on just the buttons we can handle sanely
|
||||
NSDictionary *matchingElements =
|
||||
[NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
|
||||
@kIOHIDElementTypeKey,
|
||||
[NSNumber numberWithInteger: 0], @kIOHIDElementMinKey,
|
||||
[NSNumber numberWithInteger: 1], @kIOHIDElementMaxKey,
|
||||
nil];
|
||||
NSDictionary *matchingElements = @{
|
||||
@kIOHIDElementTypeKey : [NSNumber numberWithInteger: kIOHIDElementTypeInput_Button],
|
||||
@kIOHIDElementMinKey : [NSNumber numberWithInteger: 0],
|
||||
@kIOHIDElementMaxKey : [NSNumber numberWithInteger: 1]
|
||||
};
|
||||
|
||||
CFArrayRef elements = IOHIDDeviceCopyMatchingElements(m_device,
|
||||
(CFDictionaryRef)matchingElements, kIOHIDOptionsTypeNone);
|
||||
|
Reference in New Issue
Block a user