dwmapi: Partially implement DwmGetCompositionTimingInfo().
This makes Tencent START cloud game client happy. Signed-off-by: Jactry Zeng <jzeng@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0260f2dc12
commit
182feddd4b
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue