This reverts the core fix added in https://github.com/godotengine/godot/pull/121670 and provides another approach for resolving the same issue.
The root cause of the issue was that we were attempting to initialize the `DisplayServer` when the screen was off and the surface was being destroyed. To prevent, the new approach ensures that the app is resumed before we attempt to initialize. Post initialization, we are free to continue rendering as usual.
(cherry picked from commit 7f67be84b04e38d360dafac6906d4f912cef3593)
Add null check in getEditorSetting JNI call to match setEditorSetting.
Fixes error when game runner process calls getEditorSetting before
EditorSettings is initialized.
(cherry picked from commit 19bbd4ccdd22a5ac9ed134f93ceb0db9149a13ae)
When a soft keyboard's backspace sends KEYCODE_DEL via sendKeyEvent(),
GodotEditText.onKeyDown() delegates to super.onKeyDown() which modifies
the EditText's Editable, triggering beforeTextChanged() in
GodotTextInputWrapper, which then forwards KEYCODE_DEL to the engine.
However, the EditText is only seeded with text up to the cursor position
(mOriginText) when the keyboard opens. Once the user backspaces through
all of that content, the EditText becomes empty. At that point,
super.onKeyDown(KEYCODE_DEL) on an empty EditText makes no change to the
Editable, so beforeTextChanged() never fires and the engine receives no
DEL event — even though the engine's own buffer still has text before
the cursor.
This causes a visible bug: the user can delete characters they typed in
the current session, but backspacing further into pre-existing text does
nothing. Re-tapping the field fixes it temporarily because showKeyboard()
is called again, reseeding the EditText with the current text and cursor
position.
Fixed this by forwarding KEYCODE_DEL directly to the engine when the
EditText is empty, bypassing the TextWatcher path that can't fire in
that state. This produces no double events since beforeTextChanged()
is physically unable to fire on an empty field.
Move DEL release event from onKeyDown to onKeyUp
(cherry picked from commit c0bb5a2d1f372d05ece2263a3c0634ec5c909a62)
Kotlin's `==` on the proxy compiles to `proxy.equals(args[0])`, which
the JDK proxy dispatches back through the InvocationHandler, hitting
the same branch and recursing into StackOverflowError. Use `===` for
reference equality, matching the default Object#equals behavior.
Object.hashCode() must return Int (32-bit), but the proxy InvocationHandler
returned godotObjectID directly (Long, 64-bit). When a HashMap-like container
called proxy.hashCode(), the auto-generated proxy did (Integer) result on a
java.lang.Long and threw ClassCastException.
Signed-off-by: Muteem <29696635+Muteem@users.noreply.github.com>
JDK contract: InvocationHandler.invoke's args parameter is null when
the proxied interface method takes no arguments. The proxy handlers
in AndroidRuntimePlugin used `*args` directly, which spread-deref'd
null and threw NullPointerException.
Signed-off-by: Muteem <29696635+Muteem@users.noreply.github.com>
The current obb support was specific to the Google Play store which has deprecated the format in favor on Android bundle and Play asset delivery.
For projects that still have a dependency on the Play store obb support, the deprecated logic has been moved into a separate Godot Obb Android plugin.
When `rendering/textures/vram_compression/import_etc2_astc` is disabled
in Project Settings, the Android export would silently fail with only a
generic "configuration errors" message, giving no indication of what
needed to be fixed.
This was especially problematic for headless/CI exports where there is
no visual feedback at all.
EGL brings in platform-specific headers such as the dreaded `windows.h`,
and `platform_gl.h` is used throughout `drivers/gles3` for basic OpenGL
types such as `GLuint`. We don't want `windows.h` pollution there.
Note for Android: EGL seems used explicitly only via `rasterizer_gles3.cpp`
to enable GL debug printing, and some custom stuff in `config.cpp`.