mirror of https://github.com/encounter/SDL.git
events: eliminate redundant code in SDL_SendEditingText
This commit is contained in:
parent
dad8df3ed1
commit
b886f4c6c9
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in New Issue