[PATCH 2/5] wined3d: Rename the wined3d_adapter "num" field to "ordinal".
Henri Verbeet
hverbeet at codeweavers.com
Mon Dec 7 13:20:00 CST 2009
This makes it consistent with dxgi_adapter.
---
dlls/wined3d/device.c | 6 +++---
dlls/wined3d/directx.c | 4 ++--
dlls/wined3d/swapchain_base.c | 2 +-
dlls/wined3d/wined3d_private.h | 2 +-
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index b286b69..bf81ea9 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1110,7 +1110,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
}
/* Get info on the current display setup */
- IWineD3D_GetAdapterDisplayMode(This->wineD3D, This->adapter->num, &Mode);
+ IWineD3D_GetAdapterDisplayMode(This->wineD3D, This->adapter->ordinal, &Mode);
object->orig_width = Mode.Width;
object->orig_height = Mode.Height;
object->orig_fmt = Mode.Format;
@@ -6615,10 +6615,10 @@ static BOOL is_display_mode_supported(IWineD3DDeviceImpl *This, const WINED3DPRE
if(!pp->BackBufferWidth) return TRUE;
if(!pp->BackBufferHeight) return TRUE;
- count = IWineD3D_GetAdapterModeCount(This->wineD3D, This->adapter->num, WINED3DFMT_UNKNOWN);
+ count = IWineD3D_GetAdapterModeCount(This->wineD3D, This->adapter->ordinal, WINED3DFMT_UNKNOWN);
for(i = 0; i < count; i++) {
memset(&m, 0, sizeof(m));
- hr = IWineD3D_EnumAdapterModes(This->wineD3D, This->adapter->num, WINED3DFMT_UNKNOWN, i, &m);
+ hr = IWineD3D_EnumAdapterModes(This->wineD3D, This->adapter->ordinal, WINED3DFMT_UNKNOWN, i, &m);
if(FAILED(hr)) {
ERR("EnumAdapterModes failed\n");
}
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 60db4a4..405ae97 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -4676,7 +4676,7 @@ BOOL InitAdapters(IWineD3DImpl *This)
HDC hdc;
TRACE("Initializing default adapter\n");
- adapter->num = 0;
+ adapter->ordinal = 0;
adapter->monitorPoint.x = -1;
adapter->monitorPoint.y = -1;
@@ -4884,7 +4884,7 @@ BOOL InitAdapters(IWineD3DImpl *This)
nogl_adapter:
/* Initialize an adapter for ddraw-only memory counting */
memset(This->adapters, 0, sizeof(This->adapters));
- This->adapters[0].num = 0;
+ This->adapters[0].ordinal = 0;
This->adapters[0].opengl = FALSE;
This->adapters[0].monitorPoint.x = -1;
This->adapters[0].monitorPoint.y = -1;
diff --git a/dlls/wined3d/swapchain_base.c b/dlls/wined3d/swapchain_base.c
index 31b9d07..132e0bc 100644
--- a/dlls/wined3d/swapchain_base.c
+++ b/dlls/wined3d/swapchain_base.c
@@ -139,7 +139,7 @@ HRESULT WINAPI IWineD3DBaseSwapChainImpl_GetDisplayMode(IWineD3DSwapChain *iface
HRESULT hr;
TRACE("(%p)->(%p): Calling GetAdapterDisplayMode\n", This, pMode);
- hr = IWineD3D_GetAdapterDisplayMode(This->wineD3DDevice->wineD3D, This->wineD3DDevice->adapter->num, pMode);
+ hr = IWineD3D_GetAdapterDisplayMode(This->wineD3DDevice->wineD3D, This->wineD3DDevice->adapter->ordinal, pMode);
TRACE("(%p) : returning w(%d) h(%d) rr(%d) fmt(%u,%s)\n", This, pMode->Width, pMode->Height, pMode->RefreshRate,
pMode->Format, debug_d3dformat(pMode->Format));
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 3173d12..37244f7 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -1324,7 +1324,7 @@ struct wined3d_driver_info
/* The adapter structure */
struct wined3d_adapter
{
- UINT num;
+ UINT ordinal;
BOOL opengl;
POINT monitorPoint;
struct wined3d_gl_info gl_info;
--
1.6.4.4
More information about the wine-patches
mailing list