Andrew Eikum (@aeikum) commented about dlls/mmdevapi/devenum.c:
pv.vt = VT_LPWSTR; pv.pwszVal = name; + + if (SUCCEEDED(set_driver_prop_value(id, flow, &devicepath_key))) { + PROPVARIANT pv2; + + PropVariantInit(&pv2); + + if (SUCCEEDED(MMDevice_GetPropValue(id, flow, &devicepath_key, &pv2)) && pv2.vt == VT_LPWSTR) { + WCHAR *override; + if ((override = find_product_name_override(pv2.pwszVal)) != NULL) + pv.pwszVal = find_product_name_override(pv2.pwszVal);
Can you just set to `override` here instead of calling `find_product_name_override` twice? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/338#note_3041