mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 07:53:37 +00:00
dwrite: Fix GetClusterMetrics() return value.
This commit is contained in:
parent
8a46a01008
commit
e6ce0e9f26
|
@ -1730,7 +1730,7 @@ static HRESULT WINAPI dwritetextlayout_GetClusterMetrics(IDWriteTextLayout2 *ifa
|
|||
memcpy(metrics, This->clusters, sizeof(DWRITE_CLUSTER_METRICS)*min(max_count, This->clusters_count));
|
||||
|
||||
*count = This->clusters_count;
|
||||
return max_count < This->clusters_count ? S_OK : E_NOT_SUFFICIENT_BUFFER;
|
||||
return max_count >= This->clusters_count ? S_OK : E_NOT_SUFFICIENT_BUFFER;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI dwritetextlayout_DetermineMinWidth(IDWriteTextLayout2 *iface, FLOAT* min_width)
|
||||
|
|
|
@ -947,7 +947,6 @@ static void test_GetClusterMetrics(void)
|
|||
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, NULL, 0, &count);
|
||||
todo_wine
|
||||
ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr);
|
||||
ok(count == 4, "got %u\n", count);
|
||||
|
||||
|
@ -962,10 +961,10 @@ todo_wine
|
|||
/* inline object takes a separate cluster, replaced codepoints number doesn't matter */
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, NULL, 0, &count);
|
||||
todo_wine {
|
||||
ok(hr == E_NOT_SUFFICIENT_BUFFER, "got 0x%08x\n", hr);
|
||||
todo_wine
|
||||
ok(count == 3, "got %u\n", count);
|
||||
}
|
||||
|
||||
IDWriteInlineObject_Release(trimm);
|
||||
IDWriteTextLayout_Release(layout);
|
||||
IDWriteTextFormat_Release(format);
|
||||
|
|
Loading…
Reference in a new issue