Commit 2ad58089 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: wined3d_device_get_creation_parameters() never fails.

parent 6e5cf8c6
......@@ -479,16 +479,15 @@ static HRESULT WINAPI d3d8_device_GetCreationParameters(IDirect3DDevice8 *iface,
D3DDEVICE_CREATION_PARAMETERS *parameters)
{
struct d3d8_device *device = impl_from_IDirect3DDevice8(iface);
HRESULT hr;
TRACE("iface %p, parameters %p.\n", iface, parameters);
wined3d_mutex_lock();
hr = wined3d_device_get_creation_parameters(device->wined3d_device,
wined3d_device_get_creation_parameters(device->wined3d_device,
(struct wined3d_device_creation_parameters *)parameters);
wined3d_mutex_unlock();
return hr;
return D3D_OK;
}
static HRESULT WINAPI d3d8_device_SetCursorProperties(IDirect3DDevice8 *iface,
......
......@@ -422,16 +422,15 @@ static HRESULT WINAPI d3d9_device_GetCreationParameters(IDirect3DDevice9Ex *ifac
D3DDEVICE_CREATION_PARAMETERS *parameters)
{
struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface);
HRESULT hr;
TRACE("iface %p, parameters %p.\n", iface, parameters);
wined3d_mutex_lock();
hr = wined3d_device_get_creation_parameters(device->wined3d_device,
wined3d_device_get_creation_parameters(device->wined3d_device,
(struct wined3d_device_creation_parameters *)parameters);
wined3d_mutex_unlock();
return hr;
return D3D_OK;
}
static HRESULT WINAPI d3d9_device_SetCursorProperties(IDirect3DDevice9Ex *iface,
......
......@@ -141,19 +141,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetAdapter(IWineDXGIDevice *iface,
{
struct dxgi_device *This = impl_from_IWineDXGIDevice(iface);
struct wined3d_device_creation_parameters create_parameters;
HRESULT hr;
TRACE("iface %p, adapter %p\n", iface, adapter);
EnterCriticalSection(&dxgi_cs);
hr = wined3d_device_get_creation_parameters(This->wined3d_device, &create_parameters);
if (FAILED(hr))
{
LeaveCriticalSection(&dxgi_cs);
return hr;
}
wined3d_device_get_creation_parameters(This->wined3d_device, &create_parameters);
LeaveCriticalSection(&dxgi_cs);
return IWineDXGIFactory_EnumAdapters(This->factory, create_parameters.adapter_idx, adapter);
......
......@@ -5263,13 +5263,12 @@ HRESULT CDECL wined3d_device_set_dialog_box_mode(struct wined3d_device *device,
}
HRESULT CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device,
void CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device,
struct wined3d_device_creation_parameters *parameters)
{
TRACE("device %p, parameters %p.\n", device, parameters);
*parameters = device->create_parms;
return WINED3D_OK;
}
void CDECL wined3d_device_set_gamma_ramp(const struct wined3d_device *device,
......
......@@ -2114,7 +2114,7 @@ HRESULT __cdecl wined3d_device_get_clip_plane(const struct wined3d_device *devic
UINT plane_idx, struct wined3d_vec4 *plane);
HRESULT __cdecl wined3d_device_get_clip_status(const struct wined3d_device *device,
struct wined3d_clip_status *clip_status);
HRESULT __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device,
void __cdecl wined3d_device_get_creation_parameters(const struct wined3d_device *device,
struct wined3d_device_creation_parameters *creation_parameters);
struct wined3d_surface * __cdecl wined3d_device_get_depth_stencil(const struct wined3d_device *device);
HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);
......
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