Skip to content

Commit c327b57

Browse files
Fix double emission of NOTIFICATION_WM_GO_BACK_REQUEST
1 parent aa65940 commit c327b57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

platform/android/android_input_handler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ void AndroidInputHandler::process_key_event(int p_physical_keycode, int p_unicod
130130

131131
_set_key_modifier_state(ev, keycode);
132132

133-
if (p_physical_keycode == AKEYCODE_BACK) {
133+
if (p_physical_keycode == AKEYCODE_BACK && p_pressed) {
134134
if (DisplayServerAndroid *dsa = Object::cast_to<DisplayServerAndroid>(DisplayServer::get_singleton())) {
135135
dsa->send_window_event(DisplayServer::WINDOW_EVENT_GO_BACK_REQUEST, true);
136136
}

0 commit comments

Comments
 (0)