From 18679af4ec641a4c59753d54751dcab257777eef Mon Sep 17 00:00:00 2001 From: capitalistspz Date: Fri, 19 Jan 2024 14:07:17 +0000 Subject: [PATCH] Ignore Wii U pro controller --- src/input/api/Wiimote/hidapi/HidapiWiimote.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input/api/Wiimote/hidapi/HidapiWiimote.cpp b/src/input/api/Wiimote/hidapi/HidapiWiimote.cpp index a5701f56..db185675 100644 --- a/src/input/api/Wiimote/hidapi/HidapiWiimote.cpp +++ b/src/input/api/Wiimote/hidapi/HidapiWiimote.cpp @@ -1,9 +1,11 @@ #include "HidapiWiimote.h" +#include static constexpr uint16 WIIMOTE_VENDOR_ID = 0x057e; static constexpr uint16 WIIMOTE_PRODUCT_ID = 0x0306; static constexpr uint16 WIIMOTE_MP_PRODUCT_ID = 0x0330; static constexpr uint16 WIIMOTE_MAX_INPUT_REPORT_LENGTH = 22; +static constexpr auto PRO_CONTROLLER_NAME = L"Nintendo RVL-CNT-01-UC"; HidapiWiimote::HidapiWiimote(hid_device* dev, std::string_view path) : m_handle(dev), m_path(path) { @@ -30,6 +32,8 @@ std::vector HidapiWiimote::get_devices() { for (auto it = device_enumeration; it != nullptr; it = it->next){ if (it->product_id != WIIMOTE_PRODUCT_ID && it->product_id != WIIMOTE_MP_PRODUCT_ID) continue; + if (std::wcscmp(it->product_string, PRO_CONTROLLER_NAME) == 0) + continue; auto dev = hid_open_path(it->path); if (!dev){ cemuLog_logDebug(LogType::Force, "Unable to open Wiimote device at {}: {}", it->path, boost::nowide::narrow(hid_error(nullptr)));