diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2022-07-22 00:48:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-22 00:48:06 +0200 |
commit | 19db9ed8634720e00b06333b77667450ca352784 (patch) | |
tree | 7bf382ffeb6af73bc5801bfb6a049a51d497820e /core/debugger/engine_debugger.cpp | |
parent | 2280f85bc5cd1dc3860dffe3501c5be1dc89a193 (diff) | |
parent | 033001375fcfd40edcf52264acc6e3d3c5c78f86 (diff) |
Merge pull request #63286 from RandomShaper/fix_debugger_focus
Diffstat (limited to 'core/debugger/engine_debugger.cpp')
-rw-r--r-- | core/debugger/engine_debugger.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/debugger/engine_debugger.cpp b/core/debugger/engine_debugger.cpp index 263c75760b..d495a8ee20 100644 --- a/core/debugger/engine_debugger.cpp +++ b/core/debugger/engine_debugger.cpp @@ -43,6 +43,8 @@ HashMap<StringName, EngineDebugger::Profiler> EngineDebugger::profilers; HashMap<StringName, EngineDebugger::Capture> EngineDebugger::captures; HashMap<String, EngineDebugger::CreatePeerFunc> EngineDebugger::protocols; +void (*EngineDebugger::allow_focus_steal_fn)(); + void EngineDebugger::register_profiler(const StringName &p_name, const Profiler &p_func) { ERR_FAIL_COND_MSG(profilers.has(p_name), "Profiler already registered: " + p_name); profilers.insert(p_name, p_func); @@ -133,7 +135,7 @@ void EngineDebugger::iteration(uint64_t p_frame_ticks, uint64_t p_process_ticks, singleton->poll_events(true); } -void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, Vector<String> p_breakpoints) { +void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, Vector<String> p_breakpoints, void (*p_allow_focus_steal_fn)()) { register_uri_handler("tcp://", RemoteDebuggerPeerTCP::create); // TCP is the default protocol. Platforms/modules can add more. if (p_uri.is_empty()) { return; @@ -174,6 +176,8 @@ void EngineDebugger::initialize(const String &p_uri, bool p_skip_breakpoints, Ve singleton_script_debugger->insert_breakpoint(bp.substr(sp + 1, bp.length()).to_int(), bp.substr(0, sp)); } + + allow_focus_steal_fn = p_allow_focus_steal_fn; } void EngineDebugger::deinitialize() { |