Pārlūkot izejas kodu

Fix Godot getting swamped by debug events

Bernhard Liebl 7 gadi atpakaļ
vecāks
revīzija
bd5e3052ac
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5 0
      editor/script_editor_debugger.cpp

+ 5 - 0
editor/script_editor_debugger.cpp

@@ -1052,6 +1052,8 @@ void ScriptEditorDebugger::_notification(int p_what) {
 				break;
 			};
 
+			const uint64_t until = OS::get_singleton()->get_ticks_msec() + 20;
+
 			while (ppeer->get_available_packet_count() > 0) {
 
 				if (pending_in_queue) {
@@ -1116,6 +1118,9 @@ void ScriptEditorDebugger::_notification(int p_what) {
 						break;
 					}
 				}
+
+				if (OS::get_singleton()->get_ticks_msec() > until)
+					break;
 			}
 
 		} break;