mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
[WIN32K] Work around GCC builds inventing dead keys.
CORE-14948
This commit is contained in:
parent
7882b6cfe3
commit
3d3bd4e77e
1 changed files with 21 additions and 8 deletions
|
@ -467,18 +467,31 @@ IntToUnicodeEx(UINT wVirtKey,
|
||||||
WCHAR wchFirst, wchSecond;
|
WCHAR wchFirst, wchSecond;
|
||||||
TRACE("Previous dead char: %lc (%x)\n", wchDead, wchDead);
|
TRACE("Previous dead char: %lc (%x)\n", wchDead, wchDead);
|
||||||
|
|
||||||
for (i = 0; pKbdTbl->pDeadKey[i].dwBoth; i++)
|
if (pKbdTbl->pDeadKey)
|
||||||
{
|
{
|
||||||
wchFirst = pKbdTbl->pDeadKey[i].dwBoth >> 16;
|
for (i = 0; pKbdTbl->pDeadKey[i].dwBoth; i++)
|
||||||
wchSecond = pKbdTbl->pDeadKey[i].dwBoth & 0xFFFF;
|
|
||||||
if (wchFirst == wchDead && wchSecond == wchTranslatedChar)
|
|
||||||
{
|
{
|
||||||
wchTranslatedChar = pKbdTbl->pDeadKey[i].wchComposed;
|
wchFirst = pKbdTbl->pDeadKey[i].dwBoth >> 16;
|
||||||
wchDead = 0;
|
wchSecond = pKbdTbl->pDeadKey[i].dwBoth & 0xFFFF;
|
||||||
bDead = FALSE;
|
if (wchFirst == wchDead && wchSecond == wchTranslatedChar)
|
||||||
break;
|
{
|
||||||
|
wchTranslatedChar = pKbdTbl->pDeadKey[i].wchComposed;
|
||||||
|
wchDead = 0;
|
||||||
|
bDead = FALSE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
if (wchDead == 0x8000)
|
||||||
|
{
|
||||||
|
ERR("GCC is inventing bits, ignoring fake dead key\n");
|
||||||
|
wchDead = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
TRACE("Final char: %lc (%x)\n", wchTranslatedChar, wchTranslatedChar);
|
TRACE("Final char: %lc (%x)\n", wchTranslatedChar, wchTranslatedChar);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue