For D3D9 and older, adapters are actually outputs.
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- dlls/d3d8/directx.c | 2 +- dlls/d3d9/directx.c | 2 +- dlls/wined3d/directx.c | 7 +++++++ dlls/wined3d/wined3d.spec | 1 + include/wine/wined3d.h | 1 + 5 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index d1f8872d12..256fcf4e29 100644 --- a/dlls/d3d8/directx.c +++ b/dlls/d3d8/directx.c @@ -98,7 +98,7 @@ static UINT WINAPI d3d8_GetAdapterCount(IDirect3D8 *iface) TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); - count = wined3d_get_adapter_count(d3d8->wined3d); + count = wined3d_get_output_count(d3d8->wined3d); wined3d_mutex_unlock();
return count; diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index b552c3b910..9a48b5c7c2 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -113,7 +113,7 @@ static UINT WINAPI d3d9_GetAdapterCount(IDirect3D9Ex *iface) TRACE("iface %p.\n", iface);
wined3d_mutex_lock(); - ret = wined3d_get_adapter_count(d3d9->wined3d); + ret = wined3d_get_output_count(d3d9->wined3d); wined3d_mutex_unlock();
return ret; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 3d676f7e10..e6abd139d0 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -892,6 +892,13 @@ UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d) return wined3d->adapter_count; }
+UINT CDECL wined3d_get_output_count(const struct wined3d *wined3d) +{ + TRACE("wined3d %p, reporting %u outputs.\n", wined3d, wined3d->output_count); + + return wined3d->output_count; +} + HRESULT CDECL wined3d_register_software_device(struct wined3d *wined3d, void *init_function) { FIXME("wined3d %p, init_function %p stub!\n", wined3d, init_function); diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index c8ef442c72..2cd66ec215 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -18,6 +18,7 @@ @ cdecl wined3d_get_adapter_output(ptr long ptr) @ cdecl wined3d_get_adapter_raster_status(ptr long ptr) @ cdecl wined3d_get_device_caps(ptr long long ptr) +@ cdecl wined3d_get_output_count(ptr) @ cdecl wined3d_get_output_desc(ptr long ptr) @ cdecl wined3d_incref(ptr) @ cdecl wined3d_register_software_device(ptr ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index d313c7aec8..925d4111d9 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2272,6 +2272,7 @@ HRESULT __cdecl wined3d_get_adapter_raster_status(const struct wined3d *wined3d, struct wined3d_raster_status *raster_status); HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, unsigned int adapter_idx, enum wined3d_device_type device_type, struct wined3d_caps *caps); +UINT __cdecl wined3d_get_output_count(const struct wined3d *wined3d); HRESULT __cdecl wined3d_get_output_desc(const struct wined3d *wined3d, unsigned int adapter_idx, struct wined3d_output_desc *desc); ULONG __cdecl wined3d_incref(struct wined3d *wined3d);