[PATCH v2 0/1] MR338: mmdevapi: Override product strings for DualSense controller audio devices

Andrew Eikum (@aeikum) wine at gitlab.winehq.org
Thu Jun 30 08:27:07 CDT 2022


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



More information about the wine-devel mailing list