Commit 182feddd authored by Jactry Zeng's avatar Jactry Zeng Committed by Alexandre Julliard

dwmapi: Partially implement DwmGetCompositionTimingInfo().

This makes Tencent START cloud game client happy. Signed-off-by: 's avatarJactry Zeng <jzeng@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 0260f2dc
......@@ -218,9 +218,15 @@ HRESULT WINAPI DwmGetCompositionTimingInfo(HWND hwnd, DWM_TIMING_INFO *info)
{
static int i;
if (!info)
return E_INVALIDARG;
if (info->cbSize != sizeof(DWM_TIMING_INFO))
return MILERR_MISMATCHED_SIZE;
if(!i++) FIXME("(%p %p)\n", hwnd, info);
return E_NOTIMPL;
return S_OK;
}
/**********************************************************************
......
......@@ -33,7 +33,36 @@ static void test_DwmIsCompositionEnabled(void)
ok(enabled == TRUE || enabled == FALSE, "Got unexpected %#x.\n", enabled);
}
static void test_DwmGetCompositionTimingInfo(void)
{
DWM_TIMING_INFO timing_info;
BOOL enabled;
HRESULT hr;
enabled = FALSE;
hr = DwmIsCompositionEnabled(&enabled);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
if (!enabled)
{
skip("DWM is disabled.\n");
return;
}
hr = DwmGetCompositionTimingInfo(NULL, NULL);
ok(hr == E_INVALIDARG, "Got hr %#lx.\n", hr);
memset(&timing_info, 0, sizeof(timing_info));
hr = DwmGetCompositionTimingInfo(NULL, &timing_info);
ok(hr == MILERR_MISMATCHED_SIZE, "Got hr %#lx.\n", hr);
timing_info.cbSize = sizeof(timing_info);
hr = DwmGetCompositionTimingInfo(NULL, &timing_info);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
START_TEST(dwmapi)
{
test_DwmIsCompositionEnabled();
test_DwmGetCompositionTimingInfo();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment