@@ -70,7 +70,7 @@ struct PSMoveAPI {
7070
7171 void update ();
7272
73- static void on_monitor_event (enum MonitorEvent event, enum MonitorEventDeviceType device_type, const char *path, const wchar_t *serial, void *user_data);
73+ static void on_monitor_event (enum MonitorEvent event, enum MonitorEventDeviceType device_type, const char *path, const wchar_t *serial, unsigned short pid, void *user_data);
7474
7575 EventReceiver *receiver;
7676 void *user_data;
@@ -290,7 +290,7 @@ PSMoveAPI::update()
290290}
291291
292292void
293- PSMoveAPI::on_monitor_event (enum MonitorEvent event, enum MonitorEventDeviceType device_type, const char *path, const wchar_t *serial, void *user_data)
293+ PSMoveAPI::on_monitor_event (enum MonitorEvent event, enum MonitorEventDeviceType device_type, const char *path, const wchar_t *serial, unsigned short pid, void *user_data)
294294{
295295 auto self = static_cast <PSMoveAPI *>(user_data);
296296
@@ -308,10 +308,6 @@ PSMoveAPI::on_monitor_event(enum MonitorEvent event, enum MonitorEventDeviceType
308308 }
309309 }
310310
311- // TODO: FIXME: This should use the device's actual USB product ID.
312- // HACK: We rely on this invalid PID being translated to a
313- // valid controller model (the old ZCM1, by default).
314- unsigned short pid = 0 ;
315311 PSMove *move = psmove_connect_internal (serial, path, -1 , pid);
316312 if (move == nullptr ) {
317313 PSMOVE_ERROR (" Cannot open move for retrieving serial!" );
0 commit comments