diff --git a/lib/wiiuse/os_win.c b/lib/wiiuse/os_win.c index c0f0010b5..8a3de24de 100644 --- a/lib/wiiuse/os_win.c +++ b/lib/wiiuse/os_win.c @@ -111,10 +111,13 @@ int wiiuse_os_find(struct wiimote_t** wm, int max_wiimotes, int timeout) { attr.Size = sizeof(attr); i = HidD_GetAttributes(dev, &attr); - if ((attr.VendorID == WM_VENDOR_ID) && (attr.ProductID == WM_PRODUCT_ID)) { + if ((attr.VendorID == WM_VENDOR_ID) && (attr.ProductID == WM_PRODUCT_ID || attr.ProductID == WM_PLUS_PRODUCT_ID)) { /* this is a wiimote */ wm[found]->dev_handle = dev; + if(attr.ProductID == WM_PLUS_PRODUCT_ID) + wm[found]->type = WIIUSE_WIIMOTE_MOTION_PLUS_INSIDE; + wm[found]->hid_overlap.hEvent = CreateEvent(NULL, 1, 1, ""); wm[found]->hid_overlap.Offset = 0; wm[found]->hid_overlap.OffsetHigh = 0; diff --git a/lib/wiiuse/wiiuse_internal.h b/lib/wiiuse/wiiuse_internal.h index 9f565c70b..ab7f2285c 100644 --- a/lib/wiiuse/wiiuse_internal.h +++ b/lib/wiiuse/wiiuse_internal.h @@ -165,6 +165,7 @@ #endif #define WM_VENDOR_ID 0x057E #define WM_PRODUCT_ID 0x0306 +#define WM_PLUS_PRODUCT_ID 0x0330 /* controller status stuff */ #define WM_MAX_BATTERY_CODE 0xC8