mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From 297166d280007d0e4413ec5977497a848dda678b Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
|
Date: Fri, 19 Dec 2014 21:20:21 +0100
|
|
Subject: dxgi: Implement IDXGIOutput::GetDesc.
|
|
|
|
---
|
|
dlls/dxgi/output.c | 29 +++++++++++++++++++++++++++--
|
|
1 file changed, 27 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c
|
|
index f4a5c29..158491e 100644
|
|
--- a/dlls/dxgi/output.c
|
|
+++ b/dlls/dxgi/output.c
|
|
@@ -114,9 +114,34 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput *iface,
|
|
|
|
static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput *iface, DXGI_OUTPUT_DESC *desc)
|
|
{
|
|
- FIXME("iface %p, desc %p stub!\n", iface, desc);
|
|
+ struct dxgi_output *This = impl_from_IDXGIOutput(iface);
|
|
+ struct wined3d *wined3d;
|
|
+ MONITORINFOEXW monitor_info;
|
|
|
|
- return E_NOTIMPL;
|
|
+ FIXME("iface %p, desc %p semi-stub!\n", iface, desc);
|
|
+
|
|
+ if (!desc)
|
|
+ return DXGI_ERROR_INVALID_CALL;
|
|
+
|
|
+ wined3d = This->adapter->parent->wined3d;
|
|
+
|
|
+ EnterCriticalSection(&dxgi_cs);
|
|
+ desc->Monitor = wined3d_get_adapter_monitor(wined3d, This->adapter->ordinal);
|
|
+ LeaveCriticalSection(&dxgi_cs);
|
|
+
|
|
+ if (!desc->Monitor)
|
|
+ return DXGI_ERROR_INVALID_CALL;
|
|
+
|
|
+ monitor_info.cbSize = sizeof(monitor_info);
|
|
+ if (!GetMonitorInfoW(desc->Monitor, (MONITORINFO *)&monitor_info))
|
|
+ return DXGI_ERROR_INVALID_CALL;
|
|
+
|
|
+ memcpy(&desc->DeviceName, &monitor_info.szDevice, sizeof(desc->DeviceName));
|
|
+ memcpy(&desc->DesktopCoordinates, &monitor_info.rcMonitor, sizeof(RECT));
|
|
+ desc->AttachedToDesktop = TRUE;
|
|
+ desc->Rotation = DXGI_MODE_ROTATION_IDENTITY;
|
|
+
|
|
+ return S_OK;
|
|
}
|
|
|
|
static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput *iface,
|
|
--
|
|
1.9.1
|
|
|