InputCommon: replace SerialInterface log with ControllerInterface

where appropriate. SerialInterface was a leftover from the past,
and makes no sense to be used on actual/real controllers.
This commit is contained in:
Filoppi
2021-05-04 23:37:06 +03:00
parent a8c40eb510
commit 81092cf7e4
12 changed files with 65 additions and 60 deletions

View File

@ -178,11 +178,11 @@ void Init(void* window)
HIDManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
if (!HIDManager)
ERROR_LOG_FMT(SERIALINTERFACE, "Failed to create HID Manager reference");
ERROR_LOG_FMT(CONTROLLERINTERFACE, "Failed to create HID Manager reference");
IOHIDManagerSetDeviceMatching(HIDManager, nullptr);
if (IOHIDManagerOpen(HIDManager, kIOHIDOptionsTypeNone) != kIOReturnSuccess)
ERROR_LOG_FMT(SERIALINTERFACE, "Failed to open HID Manager");
ERROR_LOG_FMT(CONTROLLERINTERFACE, "Failed to open HID Manager");
// Callbacks for acquisition or loss of a matching device
IOHIDManagerRegisterDeviceMatchingCallback(HIDManager, DeviceMatchingCallback, nullptr);
@ -198,7 +198,7 @@ void Init(void* window)
// Enable hotplugging
s_hotplug_thread = std::thread([] {
Common::SetCurrentThreadName("IOHIDManager Hotplug Thread");
NOTICE_LOG_FMT(SERIALINTERFACE, "IOHIDManager hotplug thread started");
NOTICE_LOG_FMT(CONTROLLERINTERFACE, "IOHIDManager hotplug thread started");
IOHIDManagerScheduleWithRunLoop(HIDManager, CFRunLoopGetCurrent(), OurRunLoop);
s_stopper.AddToRunLoop(CFRunLoopGetCurrent(), OurRunLoop);
@ -206,7 +206,7 @@ void Init(void* window)
s_stopper.RemoveFromRunLoop(CFRunLoopGetCurrent(), OurRunLoop);
IOHIDManagerUnscheduleFromRunLoop(HIDManager, CFRunLoopGetCurrent(), OurRunLoop);
NOTICE_LOG_FMT(SERIALINTERFACE, "IOHIDManager hotplug thread stopped");
NOTICE_LOG_FMT(CONTROLLERINTERFACE, "IOHIDManager hotplug thread stopped");
});
}

View File

@ -109,8 +109,9 @@ void Joystick::AddElements(CFArrayRef elements, std::set<IOHIDElementCookie>& co
break;
}
NOTICE_LOG_FMT(SERIALINTERFACE, "Unknown IOHIDElement, ignoring (Usage: {:x}, Type: {:x})",
usage, IOHIDElementGetType(e));
NOTICE_LOG_FMT(CONTROLLERINTERFACE,
"Unknown IOHIDElement, ignoring (Usage: {:x}, Type: {:x})", usage,
IOHIDElementGetType(e));
break;
}