diff --git a/plugins/win-capture/graphics-hook/d3d9-capture.cpp b/plugins/win-capture/graphics-hook/d3d9-capture.cpp index f5e0022fc..65ca74f1b 100644 --- a/plugins/win-capture/graphics-hook/d3d9-capture.cpp +++ b/plugins/win-capture/graphics-hook/d3d9-capture.cpp @@ -36,31 +36,25 @@ struct d3d9_data { bool using_shtex : 1; bool using_scale : 1; - volatile bool issued_queries[NUM_BUFFERS]; + /* shared texture */ + IDirect3DSurface9 *d3d9_copytex; + ID3D11Device *d3d11_device; + ID3D11DeviceContext *d3d11_context; + ID3D11Resource *d3d11_tex; + struct shtex_data *shtex_info; + HANDLE handle; + int patch; - union { - /* shared texture */ - struct { - IDirect3DSurface9 *d3d9_copytex; - ID3D11Device *d3d11_device; - ID3D11DeviceContext *d3d11_context; - ID3D11Resource *d3d11_tex; - struct shtex_data *shtex_info; - HANDLE handle; - int patch; - }; - /* shared memory */ - struct { - IDirect3DSurface9 *copy_surfaces[NUM_BUFFERS]; - IDirect3DSurface9 *render_targets[NUM_BUFFERS]; - IDirect3DQuery9 *queries[NUM_BUFFERS]; - struct shmem_data *shmem_info; - bool texture_mapped[NUM_BUFFERS]; - uint32_t pitch; - int cur_tex; - int copy_wait; - }; - }; + /* shared memory */ + IDirect3DSurface9 *copy_surfaces[NUM_BUFFERS]; + IDirect3DSurface9 *render_targets[NUM_BUFFERS]; + IDirect3DQuery9 *queries[NUM_BUFFERS]; + struct shmem_data *shmem_info; + bool texture_mapped[NUM_BUFFERS]; + volatile bool issued_queries[NUM_BUFFERS]; + uint32_t pitch; + int cur_tex; + int copy_wait; }; static struct d3d9_data data = {};