|
@@ -158,7 +158,7 @@ static hid_device* open_device_idx(int manufacturer, int product, int iface, int
|
|
|
while (cur_dev) {
|
|
|
printf("%04x:%04x %s\n", manufacturer, product, cur_dev->path);
|
|
|
|
|
|
- if(idx == device_index && iface == iface_cur){
|
|
|
+ if(findEndPoint(cur_dev->path, device_index) > 0 && iface == iface_cur){
|
|
|
ret = hid_open_path(cur_dev->path);
|
|
|
printf("opening\n");
|
|
|
}
|
|
@@ -190,7 +190,7 @@ static ohmd_device* open_device(ohmd_driver* driver, ohmd_device_desc* desc)
|
|
|
int idx = atoi(desc->path);
|
|
|
|
|
|
// Open the HMD device
|
|
|
- priv->hmd_handle = open_device_idx(SONY_ID, PSVR_HMD, 0, 0, idx);
|
|
|
+ priv->hmd_handle = open_device_idx(SONY_ID, PSVR_HMD, 0, 0, 4);
|
|
|
|
|
|
if(!priv->hmd_handle)
|
|
|
goto cleanup;
|
|
@@ -201,7 +201,7 @@ static ohmd_device* open_device(ohmd_driver* driver, ohmd_device_desc* desc)
|
|
|
}
|
|
|
|
|
|
// Open the HMD Control device
|
|
|
- priv->hmd_control = open_device_idx(SONY_ID, PSVR_HMD, 0, 0, 1);
|
|
|
+ priv->hmd_control = open_device_idx(SONY_ID, PSVR_HMD, 0, 0, 5);
|
|
|
|
|
|
if(!priv->hmd_control)
|
|
|
goto cleanup;
|