Commit 9bee50f6 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

gdi32: Fix ExtTextOutA -> W forwarding when ETO_PDY is set.

parent 6b21d0c6
...@@ -1586,13 +1586,29 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags, ...@@ -1586,13 +1586,29 @@ BOOL WINAPI ExtTextOutA( HDC hdc, INT x, INT y, UINT flags,
if (lpDx) { if (lpDx) {
unsigned int i = 0, j = 0; unsigned int i = 0, j = 0;
lpDxW = HeapAlloc( GetProcessHeap(), 0, wlen*sizeof(INT)); /* allocate enough for a ETO_PDY */
lpDxW = HeapAlloc( GetProcessHeap(), 0, 2*wlen*sizeof(INT));
while(i < count) { while(i < count) {
if(IsDBCSLeadByteEx(codepage, str[i])) { if(IsDBCSLeadByteEx(codepage, str[i]))
lpDxW[j++] = lpDx[i] + lpDx[i+1]; {
if(flags & ETO_PDY)
{
lpDxW[j++] = lpDx[i * 2] + lpDx[(i + 1) * 2];
lpDxW[j++] = lpDx[i * 2 + 1] + lpDx[(i + 1) * 2 + 1];
}
else
lpDxW[j++] = lpDx[i] + lpDx[i + 1];
i = i + 2; i = i + 2;
} else { }
lpDxW[j++] = lpDx[i]; else
{
if(flags & ETO_PDY)
{
lpDxW[j++] = lpDx[i * 2];
lpDxW[j++] = lpDx[i * 2 + 1];
}
else
lpDxW[j++] = lpDx[i];
i = i + 1; i = i + 1;
} }
} }
......
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