浏览代码

Fix double emission of NOTIFICATION_WM_GO_BACK_REQUEST

Anish Mishra 9 月之前
父节点
当前提交
c327b5797e
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/android/android_input_handler.cpp

+ 1 - 1
platform/android/android_input_handler.cpp

@@ -130,7 +130,7 @@ void AndroidInputHandler::process_key_event(int p_physical_keycode, int p_unicod
 
 	_set_key_modifier_state(ev, keycode);
 
-	if (p_physical_keycode == AKEYCODE_BACK) {
+	if (p_physical_keycode == AKEYCODE_BACK && p_pressed) {
 		if (DisplayServerAndroid *dsa = Object::cast_to<DisplayServerAndroid>(DisplayServer::get_singleton())) {
 			dsa->send_window_event(DisplayServer::WINDOW_EVENT_GO_BACK_REQUEST, true);
 		}