wined3d: Add an ordinal to struct wined3d_output.
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
5dae33dc3c
commit
e8dbb2fb6a
|
@ -116,8 +116,8 @@ static void wined3d_output_cleanup(const struct wined3d_output *output)
|
||||||
D3DKMTCloseAdapter(&close_adapter_desc);
|
D3DKMTCloseAdapter(&close_adapter_desc);
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT wined3d_output_init(struct wined3d_output *output, struct wined3d_adapter *adapter,
|
static HRESULT wined3d_output_init(struct wined3d_output *output, unsigned int ordinal,
|
||||||
const WCHAR *device_name)
|
struct wined3d_adapter *adapter, const WCHAR *device_name)
|
||||||
{
|
{
|
||||||
D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME open_adapter_desc;
|
D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME open_adapter_desc;
|
||||||
D3DKMT_CREATEDEVICE create_device_desc = {{0}};
|
D3DKMT_CREATEDEVICE create_device_desc = {{0}};
|
||||||
|
@ -137,6 +137,7 @@ static HRESULT wined3d_output_init(struct wined3d_output *output, struct wined3d
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
output->ordinal = ordinal;
|
||||||
lstrcpyW(output->device_name, device_name);
|
lstrcpyW(output->device_name, device_name);
|
||||||
output->adapter = adapter;
|
output->adapter = adapter;
|
||||||
output->kmt_adapter = open_adapter_desc.hAdapter;
|
output->kmt_adapter = open_adapter_desc.hAdapter;
|
||||||
|
@ -933,6 +934,7 @@ HRESULT CDECL wined3d_output_get_desc(const struct wined3d_output *output,
|
||||||
if (FAILED(hr = wined3d_output_get_display_mode(output, &mode, &rotation)))
|
if (FAILED(hr = wined3d_output_get_display_mode(output, &mode, &rotation)))
|
||||||
return hr;
|
return hr;
|
||||||
|
|
||||||
|
desc->ordinal = output->ordinal;
|
||||||
memcpy(desc->device_name, adapter->device_name, sizeof(desc->device_name));
|
memcpy(desc->device_name, adapter->device_name, sizeof(desc->device_name));
|
||||||
SetRect(&desc->desktop_rect, 0, 0, mode.width, mode.height);
|
SetRect(&desc->desktop_rect, 0, 0, mode.width, mode.height);
|
||||||
OffsetRect(&desc->desktop_rect, adapter->monitor_position.x, adapter->monitor_position.y);
|
OffsetRect(&desc->desktop_rect, adapter->monitor_position.x, adapter->monitor_position.y);
|
||||||
|
@ -2805,7 +2807,8 @@ BOOL wined3d_adapter_init(struct wined3d_adapter *adapter, unsigned int ordinal,
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr = wined3d_output_init(&adapter->outputs[0], adapter, display_device.DeviceName)))
|
if (FAILED(hr = wined3d_output_init(&adapter->outputs[0], 0, adapter,
|
||||||
|
display_device.DeviceName)))
|
||||||
{
|
{
|
||||||
ERR("Failed to initialise output, hr %#x.\n", hr);
|
ERR("Failed to initialise output, hr %#x.\n", hr);
|
||||||
goto done;
|
goto done;
|
||||||
|
|
|
@ -2901,6 +2901,7 @@ struct wined3d_adapter_ops
|
||||||
|
|
||||||
struct wined3d_output
|
struct wined3d_output
|
||||||
{
|
{
|
||||||
|
unsigned int ordinal;
|
||||||
WCHAR device_name[CCHDEVICENAME];
|
WCHAR device_name[CCHDEVICENAME];
|
||||||
struct wined3d_adapter *adapter;
|
struct wined3d_adapter *adapter;
|
||||||
enum wined3d_format_id screen_format;
|
enum wined3d_format_id screen_format;
|
||||||
|
|
|
@ -2138,6 +2138,7 @@ struct wined3d_view_desc
|
||||||
|
|
||||||
struct wined3d_output_desc
|
struct wined3d_output_desc
|
||||||
{
|
{
|
||||||
|
unsigned int ordinal;
|
||||||
WCHAR device_name[CCHDEVICENAME];
|
WCHAR device_name[CCHDEVICENAME];
|
||||||
RECT desktop_rect;
|
RECT desktop_rect;
|
||||||
BOOL attached_to_desktop;
|
BOOL attached_to_desktop;
|
||||||
|
|
Loading…
Reference in New Issue