wined3d: Introduce wined3d_get_adapter().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7f2aee8570
commit
81caeee85d
|
@ -865,6 +865,16 @@ enum wined3d_pci_device wined3d_gpu_from_feature_level(enum wined3d_pci_vendor *
|
|||
return device_id;
|
||||
}
|
||||
|
||||
struct wined3d_adapter * CDECL wined3d_get_adapter(const struct wined3d *wined3d, unsigned int idx)
|
||||
{
|
||||
TRACE("wined3d %p, idx %u.\n", wined3d, idx);
|
||||
|
||||
if (idx >= wined3d->adapter_count)
|
||||
return NULL;
|
||||
|
||||
return wined3d->adapters[idx];
|
||||
}
|
||||
|
||||
UINT CDECL wined3d_get_adapter_count(const struct wined3d *wined3d)
|
||||
{
|
||||
TRACE("wined3d %p, reporting %u adapters.\n",
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
@ cdecl wined3d_decref(ptr)
|
||||
@ cdecl wined3d_enum_adapter_modes(ptr long long long long ptr)
|
||||
@ cdecl wined3d_find_closest_matching_adapter_mode(ptr long ptr)
|
||||
@ cdecl wined3d_get_adapter(ptr long)
|
||||
@ cdecl wined3d_get_adapter_count(ptr)
|
||||
@ cdecl wined3d_get_adapter_display_mode(ptr long ptr ptr)
|
||||
@ cdecl wined3d_get_adapter_identifier(ptr long long ptr)
|
||||
|
|
|
@ -2178,6 +2178,7 @@ struct wined3d_parent_ops
|
|||
};
|
||||
|
||||
struct wined3d;
|
||||
struct wined3d_adapter;
|
||||
struct wined3d_blend_state;
|
||||
struct wined3d_buffer;
|
||||
struct wined3d_device;
|
||||
|
@ -2262,6 +2263,8 @@ HRESULT __cdecl wined3d_enum_adapter_modes(const struct wined3d *wined3d, UINT a
|
|||
UINT mode_idx, struct wined3d_display_mode *mode);
|
||||
HRESULT __cdecl wined3d_find_closest_matching_adapter_mode(const struct wined3d *wined3d,
|
||||
unsigned int adapter_idx, struct wined3d_display_mode *mode);
|
||||
struct wined3d_adapter * __cdecl wined3d_get_adapter(const struct wined3d *wined3d,
|
||||
unsigned int idx);
|
||||
UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d);
|
||||
HRESULT __cdecl wined3d_get_adapter_display_mode(const struct wined3d *wined3d, UINT adapter_idx,
|
||||
struct wined3d_display_mode *mode, enum wined3d_display_rotation *rotation);
|
||||
|
|
Loading…
Reference in New Issue