Add USB VID/PID to structure

This commit is contained in:
Raphael Assenat 2015-10-17 23:55:46 -04:00
parent dca3477c51
commit 9d2981cdb0
2 changed files with 3 additions and 0 deletions

View File

@ -106,6 +106,8 @@ struct gcn64_info *gcn64_listDevices(struct gcn64_info *info, struct gcn64_list_
}
if (isProductIdHandled(ctx->cur_dev->product_id, ctx->cur_dev->interface_number))
{
info->usb_vid = ctx->cur_dev->vendor_id;
info->usb_pid = ctx->cur_dev->product_id;
wcsncpy(info->str_prodname, ctx->cur_dev->product_string, PRODNAME_MAXCHARS-1);
wcsncpy(info->str_serial, ctx->cur_dev->serial_number, SERIAL_MAXCHARS-1);
strncpy(info->str_path, ctx->cur_dev->path, PATH_MAXCHARS-1);

View File

@ -12,6 +12,7 @@ struct gcn64_info {
wchar_t str_prodname[PRODNAME_MAXCHARS];
wchar_t str_serial[SERIAL_MAXCHARS];
char str_path[PATH_MAXCHARS];
int usb_vid, usb_pid;
int major, minor;
int access; // True unless direct access to read serial/prodname failed due to permissions.
};