Commit e55416a1 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: wined3d_swapchain_set_window() never fails.

parent 50c61959
...@@ -130,18 +130,16 @@ void * CDECL wined3d_swapchain_get_parent(const struct wined3d_swapchain *swapch ...@@ -130,18 +130,16 @@ void * CDECL wined3d_swapchain_get_parent(const struct wined3d_swapchain *swapch
return swapchain->parent; return swapchain->parent;
} }
HRESULT CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window) void CDECL wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window)
{ {
if (!window) if (!window)
window = swapchain->device_window; window = swapchain->device_window;
if (window == swapchain->win_handle) if (window == swapchain->win_handle)
return WINED3D_OK; return;
TRACE("Setting swapchain %p window from %p to %p.\n", TRACE("Setting swapchain %p window from %p to %p.\n",
swapchain, swapchain->win_handle, window); swapchain, swapchain->win_handle, window);
swapchain->win_handle = window; swapchain->win_handle = window;
return WINED3D_OK;
} }
HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain, HRESULT CDECL wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
......
...@@ -2379,7 +2379,7 @@ HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain, ...@@ -2379,7 +2379,7 @@ HRESULT __cdecl wined3d_swapchain_present(struct wined3d_swapchain *swapchain,
const RGNDATA *dirty_region, DWORD flags); const RGNDATA *dirty_region, DWORD flags);
HRESULT __cdecl wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain, HRESULT __cdecl wined3d_swapchain_set_gamma_ramp(const struct wined3d_swapchain *swapchain,
DWORD flags, const struct wined3d_gamma_ramp *ramp); DWORD flags, const struct wined3d_gamma_ramp *ramp);
HRESULT __cdecl wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window); void __cdecl wined3d_swapchain_set_window(struct wined3d_swapchain *swapchain, HWND window);
HRESULT __cdecl wined3d_texture_add_dirty_region(struct wined3d_texture *texture, HRESULT __cdecl wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
UINT layer, const struct wined3d_box *dirty_region); UINT layer, const struct wined3d_box *dirty_region);
......
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