From d1327bbefeceb0c53ba829ad8434805cf5ec4745 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Sun, 27 Nov 2011 21:34:48 +0100 Subject: [PATCH] wined3d: Get rid of the WINED3DDEVICE_CREATION_PARAMETERS typedef. --- dlls/d3d8/device.c | 2 +- dlls/d3d9/device.c | 2 +- dlls/dxgi/device.c | 4 ++-- dlls/wined3d/device.c | 16 ++++++++-------- dlls/wined3d/swapchain.c | 2 +- dlls/wined3d/wined3d_private.h | 2 +- include/wine/wined3d.h | 14 +++++++------- 7 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index c0039935542..a8c042d9bb4 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -440,7 +440,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetCreationParameters(IDirect3DDevice wined3d_mutex_lock(); hr = wined3d_device_get_creation_parameters(This->wined3d_device, - (WINED3DDEVICE_CREATION_PARAMETERS *)pParameters); + (struct wined3d_device_creation_parameters *)pParameters); wined3d_mutex_unlock(); return hr; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 49a32152545..f8044ff7b67 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -389,7 +389,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetCreationParameters(IDirect3DDevice wined3d_mutex_lock(); hr = wined3d_device_get_creation_parameters(This->wined3d_device, - (WINED3DDEVICE_CREATION_PARAMETERS *)pParameters); + (struct wined3d_device_creation_parameters *)pParameters); wined3d_mutex_unlock(); return hr; diff --git a/dlls/dxgi/device.c b/dlls/dxgi/device.c index 6b202356170..9cd45f93303 100644 --- a/dlls/dxgi/device.c +++ b/dlls/dxgi/device.c @@ -140,7 +140,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetParent(IWineDXGIDevice *iface, R static HRESULT STDMETHODCALLTYPE dxgi_device_GetAdapter(IWineDXGIDevice *iface, IDXGIAdapter **adapter) { struct dxgi_device *This = impl_from_IWineDXGIDevice(iface); - WINED3DDEVICE_CREATION_PARAMETERS create_parameters; + struct wined3d_device_creation_parameters create_parameters; HRESULT hr; TRACE("iface %p, adapter %p\n", iface, adapter); @@ -156,7 +156,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetAdapter(IWineDXGIDevice *iface, LeaveCriticalSection(&dxgi_cs); - return IWineDXGIFactory_EnumAdapters(This->factory, create_parameters.AdapterOrdinal, adapter); + return IWineDXGIFactory_EnumAdapters(This->factory, create_parameters.adapter_idx, adapter); } static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 6e35c0a4c81..018f57d84c7 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1582,7 +1582,7 @@ void CDECL wined3d_device_set_multithreaded(struct wined3d_device *device) TRACE("device %p.\n", device); /* For now just store the flag (needed in case of ddraw). */ - device->createParms.BehaviorFlags |= WINED3DCREATE_MULTITHREADED; + device->create_parms.flags |= WINED3DCREATE_MULTITHREADED; } HRESULT CDECL wined3d_device_set_display_mode(struct wined3d_device *device, @@ -5629,7 +5629,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, { if (swapchain->presentParms.Windowed) { - HWND focus_window = device->createParms.hFocusWindow; + HWND focus_window = device->create_parms.focus_window; if (!focus_window) focus_window = present_parameters->hDeviceWindow; if (FAILED(hr = wined3d_device_acquire_focus_window(device, focus_window))) @@ -5711,11 +5711,11 @@ HRESULT CDECL wined3d_device_set_dialog_box_mode(struct wined3d_device *device, HRESULT CDECL wined3d_device_get_creation_parameters(const struct wined3d_device *device, - WINED3DDEVICE_CREATION_PARAMETERS *parameters) + struct wined3d_device_creation_parameters *parameters) { TRACE("device %p, parameters %p.\n", device, parameters); - *parameters = device->createParms; + *parameters = device->create_parms; return WINED3D_OK; } @@ -5933,10 +5933,10 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, adapter->screen_format = mode.format_id; /* Save the creation parameters. */ - device->createParms.AdapterOrdinal = adapter_idx; - device->createParms.DeviceType = device_type; - device->createParms.hFocusWindow = focus_window; - device->createParms.BehaviorFlags = flags; + device->create_parms.adapter_idx = adapter_idx; + device->create_parms.device_type = device_type; + device->create_parms.focus_window = focus_window; + device->create_parms.flags = flags; device->devType = device_type; for (i = 0; i < PATCHMAP_SIZE; ++i) list_init(&device->patches[i]); diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index fbf19d96f4d..ae62b7200e7 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -864,7 +864,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, WINED3DSURFTY return WINED3DERR_INVALIDCALL; } - window = present_parameters->hDeviceWindow ? present_parameters->hDeviceWindow : device->createParms.hFocusWindow; + window = present_parameters->hDeviceWindow ? present_parameters->hDeviceWindow : device->create_parms.focus_window; swapchain->device = device; swapchain->parent = parent; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8ddd092499d..b32c97d2a99 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1704,7 +1704,7 @@ struct wined3d_device struct wined3d_stateblock *updateStateBlock; /* Internal use fields */ - WINED3DDEVICE_CREATION_PARAMETERS createParms; + struct wined3d_device_creation_parameters create_parms; WINED3DDEVTYPE devType; HWND focus_window; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 420c2cad093..3fc6d16db78 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -1684,13 +1684,13 @@ struct wined3d_vertex_element BYTE usage_idx; }; -typedef struct _WINED3DDEVICE_CREATION_PARAMETERS +struct wined3d_device_creation_parameters { - UINT AdapterOrdinal; - WINED3DDEVTYPE DeviceType; - HWND hFocusWindow; - DWORD BehaviorFlags; -} WINED3DDEVICE_CREATION_PARAMETERS; + UINT adapter_idx; + WINED3DDEVTYPE device_type; + HWND focus_window; + DWORD flags; +}; typedef struct _WINED3DDEVINFO_BANDWIDTHTIMINGS { @@ -2203,7 +2203,7 @@ HRESULT __cdecl wined3d_device_get_clip_plane(const struct wined3d_device *devic 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, - WINED3DDEVICE_CREATION_PARAMETERS *creation_parameters); + struct wined3d_device_creation_parameters *creation_parameters); HRESULT __cdecl wined3d_device_get_depth_stencil(const struct wined3d_device *device, struct wined3d_surface **depth_stencil); HRESULT __cdecl wined3d_device_get_device_caps(const struct wined3d_device *device, WINED3DCAPS *caps);