[PATCH 1/5] wined3d: Refactor wined3d_enum_adapter_modes() to wined3d_output_get_mode().
hverbeet at gmail.com
Wed Mar 4 09:17:30 CST 2020
On Wed, 4 Mar 2020 at 11:37, Zhiyi Zhang <zzhang at codeweavers.com> wrote:
> @@ -1107,7 +1110,9 @@ HRESULT CDECL wined3d_find_closest_matching_adapter_mode(const struct wined3d *w
> for (i = 0; i < mode_count; ++i)
> - if (FAILED(hr = wined3d_enum_adapter_modes(wined3d, adapter_idx,
> + /* TODO: Passing &wined3d->adapters->outputs is fine
> + * because adapter_idx is always zero currently */
> + if (FAILED(hr = wined3d_output_get_mode(&wined3d->adapters->outputs,
> mode->format_id, WINED3D_SCANLINE_ORDERING_UNKNOWN, i, &modes[i])))
Sure, but it would still be better to use "adapter_idx".
More broadly, you can avoid this kind of thing by reimplementing
...)", and keeping it around until no more callers that don't have an
output are left.
More information about the wine-devel