devdraw: OS X: fix Unicode input errors (Andrey Mirtchovski)

This commit is contained in:
Russ Cox 2008-07-03 13:43:58 -04:00
parent cdead40b9b
commit 5a764c33f5

View file

@ -426,9 +426,11 @@ kbdevent(EventRef event)
keystroke(k);
else{
UniChar ch;
GetEventParameter(event, kEventParamKeyUnicodes,
OSStatus s;
s = GetEventParameter(event, kEventParamKeyUnicodes,
typeUnicodeText, nil, sizeof uc, nil, &uc);
if(uc >= 0)
if(s == noErr)
keystroke(uc);
}
break;