mirror of
https://github.com/Ryujinx/SDL.git
synced 2024-12-22 20:25:38 +00:00
minor correction after previous patch and minor tidy-up.
This commit is contained in:
parent
70c5e91d0f
commit
662ea5abe4
|
@ -321,13 +321,13 @@ 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);
|
||||
char *utf8 = SDL_iconv_string("UTF-8", "", (char *)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((utf8 && *utf8) ? utf8 : (char *)&ulCharCode);
|
||||
SDL_free(utf8);
|
||||
#else
|
||||
CHAR acUTF8[4];
|
||||
LONG lRC = StrUTF8(1, acUTF8, sizeof(acUTF8), (PSZ)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((lRC > 0)? acUTF8 : (PSZ)&ulCharCode);
|
||||
char utf8[4];
|
||||
int rc = StrUTF8(1, utf8, sizeof(utf8), (char *)&ulCharCode, 1);
|
||||
SDL_SendKeyboardText((rc > 0) ? utf8 : (char *) &ulCharCode);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue