projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7882b6c
)
[WIN32K] Work around GCC builds inventing dead keys.
author
Mark Jansen
<mark.jansen@reactos.org>
Sun, 23 Sep 2018 17:28:09 +0000
(19:28 +0200)
committer
Mark Jansen
<mark.jansen@reactos.org>
Sun, 23 Sep 2018 18:03:14 +0000
(20:03 +0200)
CORE-14948
win32ss/user/ntuser/keyboard.c
patch
|
blob
|
history
diff --git
a/win32ss/user/ntuser/keyboard.c
b/win32ss/user/ntuser/keyboard.c
index
6167f9d
..
f72e275
100644
(file)
--- a/
win32ss/user/ntuser/keyboard.c
+++ b/
win32ss/user/ntuser/keyboard.c
@@
-467,17
+467,30
@@
IntToUnicodeEx(UINT wVirtKey,
WCHAR wchFirst, wchSecond;
TRACE("Previous dead char: %lc (%x)\n", wchDead, wchDead);
WCHAR wchFirst, wchSecond;
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;
- wchSecond = pKbdTbl->pDeadKey[i].dwBoth & 0xFFFF;
- if (wchFirst == wchDead && wchSecond == wchTranslatedChar)
+ for (i = 0; pKbdTbl->pDeadKey[i].dwBoth; i++)
{
{
- wchTranslatedChar = pKbdTbl->pDeadKey[i].wchComposed;
+ wchFirst = pKbdTbl->pDeadKey[i].dwBoth >> 16;
+ wchSecond = pKbdTbl->pDeadKey[i].dwBoth & 0xFFFF;
+ if (wchFirst == wchDead && wchSecond == wchTranslatedChar)
+ {
+ 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;
wchDead = 0;
- bDead = FALSE;
- break;
}
}
+#endif
}
TRACE("Final char: %lc (%x)\n", wchTranslatedChar, wchTranslatedChar);
}
TRACE("Final char: %lc (%x)\n", wchTranslatedChar, wchTranslatedChar);