Removed SDL_TEXTINPUTEVENT_TEXT_SIZE

This commit is contained in:
Sam Lantinga 2024-03-25 12:55:49 -07:00
parent fa236f169b
commit 6443c75eda
8 changed files with 14 additions and 37 deletions

View file

@ -191,17 +191,7 @@ static DBusHandlerResult DBus_MessageFilter(DBusConnection *conn, DBusMessage *m
dbus->message_iter_init(msg, &iter);
dbus->message_iter_get_basic(&iter, &text);
if (text && *text) {
char buf[SDL_TEXTINPUTEVENT_TEXT_SIZE];
size_t text_bytes = SDL_strlen(text), i = 0;
while (i < text_bytes) {
size_t sz = SDL_utf8strlcpy(buf, text + i, sizeof(buf));
SDL_SendKeyboardText(buf);
i += sz;
}
}
SDL_SendKeyboardText(text);
return DBUS_HANDLER_RESULT_HANDLED;
}