events: eliminate redundant code in SDL_SendEditingText

This commit is contained in:
pionere 2022-11-14 17:35:28 +01:00 committed by Sam Lantinga
parent dad8df3ed1
commit b886f4c6c9
1 changed files with 0 additions and 5 deletions

View File

@ -1058,11 +1058,6 @@ SDL_SendEditingText(const char *text, int start, int length)
posted = 0; posted = 0;
if (SDL_GetEventState(SDL_TEXTEDITING) == SDL_ENABLE) { if (SDL_GetEventState(SDL_TEXTEDITING) == SDL_ENABLE) {
SDL_Event event; SDL_Event event;
event.edit.type = SDL_TEXTEDITING;
event.edit.windowID = keyboard->focus ? keyboard->focus->id : 0;
event.edit.start = start;
event.edit.length = length;
SDL_utf8strlcpy(event.edit.text, text, SDL_arraysize(event.edit.text));
if (SDL_GetHintBoolean(SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, SDL_FALSE) && if (SDL_GetHintBoolean(SDL_HINT_IME_SUPPORT_EXTENDED_TEXT, SDL_FALSE) &&
SDL_strlen(text) >= SDL_arraysize(event.text.text)) { SDL_strlen(text) >= SDL_arraysize(event.text.text)) {