Assume sizeof(wchar_t) is always 4 under OS X.
wchar_t used to be 2 bytes in Mach-O builds but they're not supported any longer so remove the code checking for sizeof(wchar_t) and just assume it's always 4. Closes #10442. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -323,17 +323,13 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
|
||||
GetEventParameter( event, kEventParamKeyUnicodes, typeUnicodeText, NULL, dataSize , NULL , charBuf ) ;
|
||||
charBuf[ numChars - 1 ] = 0;
|
||||
|
||||
#if SIZEOF_WCHAR_T == 2
|
||||
uniChar = charBuf[0] ;
|
||||
#else
|
||||
wxMBConvUTF16 converter ;
|
||||
converter.MB2WC( uniChar , (const char*)charBuf , 2 ) ;
|
||||
#endif
|
||||
|
||||
if ( numChars * 2 > 4 )
|
||||
delete[] charBuf ;
|
||||
}
|
||||
#endif
|
||||
#endif // wxUSE_UNICODE
|
||||
|
||||
GetEventParameter( event, kEventParamKeyMacCharCodes, typeChar, NULL, sizeof(char), NULL, &charCode );
|
||||
GetEventParameter( event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &keyCode );
|
||||
|
||||
Reference in New Issue
Block a user