ITADN

GameActivity onTextInputEvent getting called twice

#186Openjb55 创建于 2025-03-12
J
jb55commented
When I press `a` on the virtual keyboard ```c static void onTextInputEvent(GameActivity* activity, const GameTextInputState* state) { struct android_app* android_app = ToApp(activity); LOGV("got text input event: '%.*s'", state->text_length, state->text_UTF8); pthread_mutex_lock(&android_app->mutex); if (!android_app->destroyed) { android_app->textInputState = 1; notifyInput(android_app); } pthread_mutex_unlock(&android_app->mutex); } ``` ``` 03-11 17:00:55.721 28026 28026 V android_activity: got text input event: 'a' 03-11 17:00:55.721 28026 28086 I RustStdoutStderr: Notifying Input Available 03-11 17:00:55.722 28026 28026 V android_activity: got text input event: 'aa' ``` only seems to happen on one of my devices. bizarre.
4 条评论