[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) {
This isn't a blocker, but it feels a little silly to get the value in `set_driver_prop_value` and then get it again here. You could change the `set_driver_prop_value` API to (optionally?) pass back the value it gets to the caller, who would then free it.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/338#note_3040



More information about the wine-devel mailing list