[PATCH v2 3/6] wined3d: Move fullscreen window setup/restore to new struct and functions.

Józef Kucia joseph.kucia at gmail.com
Tue Jun 25 08:51:18 CDT 2019


On Tue, Jun 25, 2019 at 3:29 PM <cmccarthy at codeweavers.com> wrote:
>
> June 25, 2019 9:54 PM, "Józef Kucia" <joseph.kucia at gmail.com> wrote:
> > This patch can be made much smaller. Just put the new functions, e.g.
> > wined3d_fullscreen_setup_window(), in the place where old functions
> > were. In result, you will get a few renames and removal of
> > "filter_messages". Moving functions to the end of the file is not
> > necessary.
> >
> >> - /* Window styles to restore when switching fullscreen mode */
> >> - LONG style;
> >> - LONG exStyle;
> >> + struct wined3d_fullscreen_state fullscreen_state;
> >
> > The fullscreen_state should probably be moved to wined3d swapchain.
>
> I kept wined3d_device_setup_fullscreen_window() and its opposite as wrappers because they are used elsewhere, for example ddraw calls them, but the swapchain pointer in struct ddraw can be null which makes it complicated. Rather than change all calls to these functions it was simpler to make it call a helper that D3D12 can use too.

Yes, that's fine. You just need to reorder the code slightly in the
file to make the patch smaller.

Also, you're probably right that moving the "fullscreen_state" to
wined3d_swapchain is not easy.



More information about the wine-devel mailing list