From eb6429d6cab153df3fb28c1170eb522d640c256d Mon Sep 17 00:00:00 2001 From: CatalystG Date: Sun, 7 Apr 2013 12:51:56 -0400 Subject: [PATCH] (BlackBerry) Fix device ID check for gamepads. --- playbook/qnx_input.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/playbook/qnx_input.c b/playbook/qnx_input.c index d6431e2a85..9039d10605 100644 --- a/playbook/qnx_input.c +++ b/playbook/qnx_input.c @@ -127,8 +127,12 @@ static void qnx_input_autodetect_gamepad(Gamepad_t* controller) { int device; - //The wiimote I have, not sure if generic. - if (strcmp(controller->id, "0-057E-0306-58.22") == 0) + //ID: A-BBBB-CCCC-D.D + //A is the device's index in the array returned by screen_get_context_property_pv() + //BBBB is the device's Vendor ID (in hexadecimal) + //CCCC is the device's Product ID (also in hexadecimal) + //D.D is the device's version number + if (strstr(controller->id, "057E-0306")) { device = DEVICE_WIIMOTE; }