mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-13 21:35:59 +00:00
stdlib: Clean up and export SDL_UCS4ToUTF8().
Also fix internal usage of the function. Fixes #10157.
This commit is contained in:
@@ -543,9 +543,9 @@ static EM_BOOL Emscripten_HandleKeyPress(int eventType, const EmscriptenKeyboard
|
||||
|
||||
if (SDL_TextInputActive(window_data->window)) {
|
||||
char text[5];
|
||||
if (SDL_UCS4ToUTF8(keyEvent->charCode, text)) {
|
||||
SDL_SendKeyboardText(text);
|
||||
}
|
||||
char *end = SDL_UCS4ToUTF8(keyEvent->charCode, text);
|
||||
*end = '\0';
|
||||
SDL_SendKeyboardText(text);
|
||||
return EM_TRUE;
|
||||
}
|
||||
return EM_FALSE;
|
||||
|
Reference in New Issue
Block a user