mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-09 05:27:58 +00:00
General: Correct fmt specifiers
Corrects a few fmt calls to use fmt's specifiers. This also converts instances of printf over to fmt::print
This commit is contained in:
@@ -55,7 +55,7 @@ void DolphinSmashAdapter::transferCycle() {
|
||||
if (recvSz != 37 || payload[0] != 0x21)
|
||||
return;
|
||||
|
||||
// printf("RECEIVED DATA %zu %02X\n", recvSz, payload[0]);
|
||||
// fmt::print("RECEIVED DATA {} {:02X}\n", recvSz, payload[0]);
|
||||
|
||||
std::lock_guard<std::mutex> lk(m_callbackLock);
|
||||
if (!m_callback)
|
||||
|
||||
@@ -43,16 +43,20 @@ void DualshockPad::deviceDisconnected() {
|
||||
|
||||
void DualshockPad::initialCycle() {
|
||||
#if 0
|
||||
uint8_t setupCommand[5] = {0xF4, 0x42, 0x0c, 0x00, 0x00}; //Tells controller to start sending changes on in pipe
|
||||
if (!sendHIDReport(setupCommand, 5, HIDReportType::Feature, 0xF4))
|
||||
{
|
||||
deviceError("Unable to send complete packet! Request size %x\n", sizeof(setupCommand));
|
||||
return;
|
||||
}
|
||||
uint8_t btAddr[8];
|
||||
receiveHIDReport(btAddr, sizeof(btAddr), HIDReportType::Feature, 0xF5);
|
||||
for (int i = 0; i < 6; i++)
|
||||
m_btAddress[5 - i] = btAddr[i + 2]; // Copy into buffer reversed, so it is LSB first
|
||||
// Tells controller to start sending changes on in pipe
|
||||
uint8_t setupCommand[5] = {0xF4, 0x42, 0x0c, 0x00, 0x00};
|
||||
|
||||
if (!sendHIDReport(setupCommand, 5, HIDReportType::Feature, 0xF4)) {
|
||||
deviceError("Unable to send complete packet! Request size {:x}\n", sizeof(setupCommand));
|
||||
return;
|
||||
}
|
||||
|
||||
uint8_t btAddr[8];
|
||||
receiveHIDReport(btAddr, sizeof(btAddr), HIDReportType::Feature, 0xF5);
|
||||
for (int i = 0; i < 6; i++) {
|
||||
// Copy into buffer reversed, so it is LSB first
|
||||
m_btAddress[5 - i] = btAddr[i + 2];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ class HIDListenerIOKit : public IHIDListener {
|
||||
|
||||
listener->m_finder._insertToken(std::make_unique<DeviceToken>(DeviceType::USB, vid, pid, vstr, pstr, devPath));
|
||||
|
||||
// printf("ADDED %08X %s\n", obj.get(), devPath);
|
||||
// fmt::print(fmt("ADDED {:08X} {}\n"), obj.get(), devPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class HIDListenerIOKit : public IHIDListener {
|
||||
if (IORegistryEntryGetPath(obj.get(), kIOServicePlane, devPath) != 0)
|
||||
continue;
|
||||
listener->m_finder._removeToken(devPath);
|
||||
// printf("REMOVED %08X %s\n", obj.get(), devPath);
|
||||
// fmt::print(fmt("REMOVED {:08X} {}\n"), obj.get(), devPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ class HIDListenerIOKit : public IHIDListener {
|
||||
|
||||
listener->m_finder._insertToken(std::make_unique<DeviceToken>(DeviceType::HID, vidv, pidv, vstr, pstr, devPath));
|
||||
|
||||
// printf("ADDED %08X %s\n", obj, devPath);
|
||||
// fmt::print(fmt("ADDED {:08X} {}\n"), obj, devPath);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,7 +207,7 @@ class HIDListenerIOKit : public IHIDListener {
|
||||
if (IORegistryEntryGetPath(obj.get(), kIOServicePlane, devPath) != 0)
|
||||
continue;
|
||||
listener->m_finder._removeToken(devPath);
|
||||
// printf("REMOVED %08X %s\n", obj, devPath);
|
||||
// fmt::print(fmt("REMOVED {:08X} {}\n"), obj, devPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,14 +118,14 @@ class HIDListenerUdev final : public IHIDListener {
|
||||
}
|
||||
|
||||
#if 0
|
||||
udev_list_entry* att = nullptr;
|
||||
udev_list_entry_foreach(att, attrs)
|
||||
{
|
||||
const char* name = udev_list_entry_get_name(att);
|
||||
const char* val = udev_list_entry_get_value(att);
|
||||
fprintf(stderr, "%s %s\n", name, val);
|
||||
}
|
||||
fprintf(stderr, "\n\n");
|
||||
udev_list_entry* att = nullptr;
|
||||
udev_list_entry_foreach(att, attrs)
|
||||
{
|
||||
const char* name = udev_list_entry_get_name(att);
|
||||
const char* val = udev_list_entry_get_value(att);
|
||||
fmt::print(stderr, fmt("{} {}\n"), name, val);
|
||||
}
|
||||
std::fputs("\n\n", stderr);
|
||||
#endif
|
||||
|
||||
m_finder._insertToken(std::make_unique<DeviceToken>(type, vid, pid, manuf, product, devPath));
|
||||
|
||||
Reference in New Issue
Block a user