On Mon, Jun 24, 2019 at 4:23 PM Conor McCarthy <cmccarthy(a)codeweavers.com> wrote:
Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> --- dlls/wined3d/device.c | 214 +++++++++++++++++---------------- dlls/wined3d/wined3d.spec | 3 + dlls/wined3d/wined3d_private.h | 5 +- include/wine/wined3d.h | 12 ++ 4 files changed, 127 insertions(+), 107 deletions(-)
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.
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8e23653..9d649fe 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3150,10 +3150,7 @@ struct wined3d_device struct wined3d_device_parent *device_parent; struct wined3d *wined3d; struct wined3d_adapter *adapter; - - /* 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.
+struct wined3d_fullscreen_state +{ + /* Window styles to restore when switching fullscreen mode */ + LONG style; + LONG exStyle; +};
It might be better to not expose implementation details and make wined3d_fullscreen_state opaque. Perhaps, wined3d_window_state is a better name?