Skip to content

Commit

Permalink
events: eliminate redundant code in SDL_SendEditingText
Browse files Browse the repository at this point in the history
  • Loading branch information
pionere authored and slouken committed Nov 14, 2022
1 parent dad8df3 commit b886f4c
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/events/SDL_keyboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1058,11 +1058,6 @@ SDL_SendEditingText(const char *text, int start, int length)
posted = 0;
if (SDL_GetEventState(SDL_TEXTEDITING) == SDL_ENABLE) {
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) &&
SDL_strlen(text) >= SDL_arraysize(event.text.text)) {
Expand Down

0 comments on commit b886f4c

Please sign in to comment.