From: Nikolay Sivov nsivov@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/dxcore/dxcore.c | 10 ++++++++-- dlls/dxcore/tests/dxcore.c | 10 ++-------- 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/dxcore/dxcore.c b/dlls/dxcore/dxcore.c index d08fd1c772b..f8a14a82998 100644 --- a/dlls/dxcore/dxcore.c +++ b/dlls/dxcore/dxcore.c @@ -166,8 +166,14 @@ static HRESULT STDMETHODCALLTYPE dxcore_adapter_GetProperty(IDXCoreAdapter *ifac static HRESULT STDMETHODCALLTYPE dxcore_adapter_GetPropertySize(IDXCoreAdapter *iface, DXCoreAdapterProperty property, size_t *buffer_size) { - FIXME("iface %p, property %u, buffer_size %p stub!\n", iface, property, buffer_size); - return E_NOTIMPL; + struct dxcore_adapter *adapter = impl_from_IDXCoreAdapter(iface); + + TRACE("iface %p, property %u, buffer_size %p.\n", iface, property, buffer_size); + + if (!buffer_size) + return E_POINTER; + + return dxcore_adapter_get_property_size(adapter, property, buffer_size); }
static BOOL STDMETHODCALLTYPE dxcore_adapter_IsQueryStateSupported(IDXCoreAdapter *iface, DXCoreAdapterState property) diff --git a/dlls/dxcore/tests/dxcore.c b/dlls/dxcore/tests/dxcore.c index 7cab5bbc55a..2f32179336b 100644 --- a/dlls/dxcore/tests/dxcore.c +++ b/dlls/dxcore/tests/dxcore.c @@ -175,14 +175,11 @@ static void test_GetProperty(void) ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, InstanceLuid, NULL); - todo_wine ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, InstanceLuid, &size); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(size == sizeof(*luid), "Unexpected property size.\n"); + ok(size == sizeof(*luid), "Unexpected property size.\n");
hr = IDXCoreAdapter_GetProperty(adapter, InstanceLuid, sizeof(luid[0]), luid); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); @@ -199,14 +196,11 @@ static void test_GetProperty(void) ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, HardwareID, NULL); - todo_wine ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDXCoreAdapter_GetPropertySize(adapter, HardwareID, &size); - todo_wine ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); - if (hr == S_OK) - ok(size == sizeof(*hwid), "Unexpected property size.\n"); + ok(size == sizeof(*hwid), "Unexpected property size.\n");
memset(hwid, 0, sizeof(hwid)); hr = IDXCoreAdapter_GetProperty(adapter, HardwareID, sizeof(hwid[0]), hwid);