Commit 3d33887c authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the WINED3DSWAPEFFECT typedef.

parent 45f6def7
......@@ -685,7 +685,7 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, HWND window, BOOL
swapchain_desc.backbuffer_width = mode.width;
swapchain_desc.backbuffer_height = mode.height;
swapchain_desc.backbuffer_format = mode.format_id;
swapchain_desc.swap_effect = WINED3DSWAPEFFECT_COPY;
swapchain_desc.swap_effect = WINED3D_SWAP_EFFECT_COPY;
swapchain_desc.device_window = window;
swapchain_desc.windowed = windowed;
......
......@@ -212,7 +212,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *
wined3d_desc.multisample_type = WINED3DMULTISAMPLE_NONE;
wined3d_desc.multisample_quality = 0;
}
wined3d_desc.swap_effect = WINED3DSWAPEFFECT_DISCARD;
wined3d_desc.swap_effect = WINED3D_SWAP_EFFECT_DISCARD;
wined3d_desc.device_window = desc->OutputWindow;
wined3d_desc.windowed = desc->Windowed;
wined3d_desc.enable_auto_depth_stencil = FALSE;
......
......@@ -1689,13 +1689,13 @@ HRESULT CDECL wined3d_surface_blt(struct wined3d_surface *dst_surface, const REC
&& dst_surface == dst_swapchain->front_buffer
&& src_surface == dst_swapchain->back_buffers[0])
{
WINED3DSWAPEFFECT swap_effect = dst_swapchain->desc.swap_effect;
enum wined3d_swap_effect swap_effect = dst_swapchain->desc.swap_effect;
TRACE("Using present for backbuffer -> frontbuffer blit.\n");
/* Set the swap effect to COPY, we don't want the backbuffer
* to become undefined. */
dst_swapchain->desc.swap_effect = WINED3DSWAPEFFECT_COPY;
dst_swapchain->desc.swap_effect = WINED3D_SWAP_EFFECT_COPY;
wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, NULL, 0);
dst_swapchain->desc.swap_effect = swap_effect;
......
......@@ -546,8 +546,8 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
*
* The DISCARD swap effect is ok as well since any backbuffer content is allowed after
* the swap. */
if (swapchain->desc.swap_effect == WINED3DSWAPEFFECT_FLIP)
FIXME("Render-to-fbo with WINED3DSWAPEFFECT_FLIP\n");
if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
FIXME("Render-to-fbo with WINED3D_SWAP_EFFECT_FLIP\n");
swapchain_blit(swapchain, context, &src_rect, &dst_rect);
}
......@@ -588,7 +588,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
* bug shows up much more than it does on Windows, and the players see single pixels
* with wrong colors.
* (The Max Payne bug has been confirmed on Windows with the debug runtime) */
if (FALSE && swapchain->desc.swap_effect == WINED3DSWAPEFFECT_DISCARD)
if (FALSE && swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_DISCARD)
{
static const struct wined3d_color cyan = {0.0f, 1.0f, 1.0f, 1.0f};
......@@ -632,7 +632,7 @@ static HRESULT swapchain_gl_present(struct wined3d_swapchain *swapchain, const R
* If the swapeffect is COPY, the content remains the same. If it is FLIP however,
* the texture / sysmem copy needs to be reloaded from the drawable
*/
if (swapchain->desc.swap_effect == WINED3DSWAPEFFECT_FLIP)
if (swapchain->desc.swap_effect == WINED3D_SWAP_EFFECT_FLIP)
surface_modify_location(swapchain->back_buffers[0], swapchain->back_buffers[0]->draw_binding, TRUE);
}
......
......@@ -501,14 +501,13 @@ enum wined3d_backbuffer_type
WINED3D_BACKBUFFER_TYPE_RIGHT = 2,
};
typedef enum _WINED3DSWAPEFFECT
enum wined3d_swap_effect
{
WINED3DSWAPEFFECT_DISCARD = 1,
WINED3DSWAPEFFECT_FLIP = 2,
WINED3DSWAPEFFECT_COPY = 3,
WINED3DSWAPEFFECT_COPY_VSYNC = 4,
WINED3DSWAPEFFECT_FORCE_DWORD = 0xffffffff
} WINED3DSWAPEFFECT;
WINED3D_SWAP_EFFECT_DISCARD = 1,
WINED3D_SWAP_EFFECT_FLIP = 2,
WINED3D_SWAP_EFFECT_COPY = 3,
WINED3D_SWAP_EFFECT_COPY_VSYNC = 4,
};
typedef enum _WINED3DSAMPLERSTATETYPE
{
......@@ -1629,7 +1628,7 @@ struct wined3d_swapchain_desc
UINT backbuffer_count;
WINED3DMULTISAMPLE_TYPE multisample_type;
DWORD multisample_quality;
WINED3DSWAPEFFECT swap_effect;
enum wined3d_swap_effect swap_effect;
HWND device_window;
BOOL windowed;
BOOL enable_auto_depth_stencil;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment