From dcab662a371c66980aacb799291d23f81a328a21 Mon Sep 17 00:00:00 2001 From: Death Killer <884052+deathkiller@users.noreply.github.com> Date: Wed, 27 Nov 2024 01:48:35 +0100 Subject: [PATCH] Removed debug messages --- .../nCine/Backends/Android/AndroidInputManager.cpp | 12 ++++-------- Sources/nCine/Backends/Android/AndroidJniHelper.cpp | 3 --- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/Sources/nCine/Backends/Android/AndroidInputManager.cpp b/Sources/nCine/Backends/Android/AndroidInputManager.cpp index d4ea7652..30339ab0 100644 --- a/Sources/nCine/Backends/Android/AndroidInputManager.cpp +++ b/Sources/nCine/Backends/Android/AndroidInputManager.cpp @@ -447,17 +447,15 @@ namespace nCine if (textInputEvent_.length > 0) { inputEventHandler_->OnTextInput(textInputEvent_); } - LOGW("ANDROIDKEY TEXT 1: %i | %i | %s", keyCode, unicodeKey, String(textInputEvent_.text, textInputEvent_.length).data()); - } else { - const int unicodeKey = keyEvent.getUnicodeChar(metaState); - LOGW("ANDROIDKEY TEXT 2: %i | %i", keyCode, unicodeKey); } } break; case AKEY_EVENT_ACTION_MULTIPLE: if (keyboardEvent_.sym != KeySym::UNKNOWN) { inputEventHandler_->OnKeyPressed(keyboardEvent_); - } else if ((metaState & AMETA_CTRL_ON) == 0) { + } + // TODO: This section doesn't work with software keyboards + /*else if ((metaState & AMETA_CTRL_ON) == 0) { // Unicode input from software keyboard long long int downTime = AKeyEvent_getDownTime(event); long long int eventTime = AKeyEvent_getEventTime(event); @@ -468,7 +466,6 @@ namespace nCine AndroidJniClass_KeyEvent keyEvent(downTime, eventTime, action, keyCode, repeatCount, metaState, deviceID, keyboardEvent_.scancode, flags, source); textInputEvent_.length = keyEvent.getCharacters(textInputEvent_.text, sizeof(textInputEvent_.text)); - LOGW("ANDROIDKEY MULTI CHARS: %i | %s", textInputEvent_.length, String(textInputEvent_.text, textInputEvent_.length).data()); if (textInputEvent_.length > 0) { inputEventHandler_->OnTextInput(textInputEvent_); } else if (keyEvent.isPrintingKey() || keyCode == AKEYCODE_SPACE) { @@ -477,9 +474,8 @@ namespace nCine if (textInputEvent_.length > 0) { inputEventHandler_->OnTextInput(textInputEvent_); } - LOGW("ANDROIDKEY MULTI CHARS TEXT: %i | %i | %s", keyCode, unicodeKey, String(textInputEvent_.text, textInputEvent_.length).data()); } - } + }*/ break; } diff --git a/Sources/nCine/Backends/Android/AndroidJniHelper.cpp b/Sources/nCine/Backends/Android/AndroidJniHelper.cpp index 1dc68d29..44e2e567 100644 --- a/Sources/nCine/Backends/Android/AndroidJniHelper.cpp +++ b/Sources/nCine/Backends/Android/AndroidJniHelper.cpp @@ -506,7 +506,6 @@ namespace nCine AndroidJniClass_KeyEvent::AndroidJniClass_KeyEvent(long long int downTime, long long int eventTime, int action, int code, int repeat, int metaState, int deviceId, int scancode, int flags, int source) { jobject javaObject = AndroidJniHelper::jniEnv->NewObject(javaClass_, midConstructor2_, downTime, eventTime, action, code, repeat, metaState, deviceId, scancode, flags, source); - LOGW("ANDROIDKEY NEW: %p | %i | %i | %i | %i", javaObject, code, scancode, metaState, flags); javaObject_ = AndroidJniHelper::jniEnv->NewGlobalRef(javaObject); } @@ -526,14 +525,12 @@ namespace nCine if (strCharacters) { const char* characters = AndroidJniHelper::jniEnv->GetStringUTFChars(strCharacters, 0); - LOGW("ANDROIDKEY getCharacters: %s", characters); length = std::min((std::int32_t)strlen(characters), maxStringSize); std::memcpy(destination, characters, length); AndroidJniHelper::jniEnv->ReleaseStringUTFChars(strCharacters, characters); AndroidJniHelper::jniEnv->DeleteLocalRef(strCharacters); } else { length = 0; - LOGW("ANDROIDKEY getCharacters NONE"); } return length;