[WIN32K] Work around GCC builds inventing dead keys.

CORE-14948
This commit is contained in:
Mark Jansen 2018-09-23 19:28:09 +02:00
parent 7882b6cfe3
commit 3d3bd4e77e
No known key found for this signature in database
GPG key ID: B39240EE84BEAE8B

View file

@ -467,6 +467,8 @@ 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);
if (pKbdTbl->pDeadKey)
{
for (i = 0; pKbdTbl->pDeadKey[i].dwBoth; i++) for (i = 0; pKbdTbl->pDeadKey[i].dwBoth; i++)
{ {
wchFirst = pKbdTbl->pDeadKey[i].dwBoth >> 16; wchFirst = pKbdTbl->pDeadKey[i].dwBoth >> 16;
@ -479,6 +481,17 @@ IntToUnicodeEx(UINT wVirtKey,
break; 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);
} }