mirror of
https://github.com/encounter/SDL.git
synced 2025-12-16 08:27:05 +00:00
os/2 optionally builds against libiconv.
This commit is contained in:
@@ -320,10 +320,15 @@ static VOID _wmChar(WINDATA *pWinData, MPARAM mp1, MPARAM mp2)
|
||||
}
|
||||
|
||||
if ((ulFlags & KC_CHAR) != 0) {
|
||||
#if defined(HAVE_ICONV) && defined(HAVE_ICONV_H)
|
||||
char *acUTF8 = SDL_iconv_string("UTF-8", "", (char *)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((acUTF8 != NULL)? acUTF8 : (char *)&ulCharCode);
|
||||
SDL_free(acUTF8);
|
||||
#else
|
||||
CHAR acUTF8[4];
|
||||
LONG lRC = StrUTF8(1, acUTF8, sizeof(acUTF8), (PSZ)&ulCharCode, 1);
|
||||
|
||||
SDL_SendKeyboardText((lRC > 0)? acUTF8 : (PSZ)&ulCharCode);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user