Skip to content

Commit

Permalink
feat: raise end sub message
Browse files Browse the repository at this point in the history
  • Loading branch information
neko-para committed Apr 3, 2024
1 parent d17a8af commit b7c4a76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/MaaFramework/MaaMsg.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,4 +176,6 @@
#define MaaMsg_Task_Debug_ListToRecognize ("Task.Debug.ListToRecognize")
#define MaaMsg_Task_Debug_Hit ("Task.Debug.Hit")

#define MaaMsg_Task_Debug_EndSub ("Task.Debug.EndSub")

/** @} */
3 changes: 3 additions & 0 deletions source/MaaFramework/Task/PipelineTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ bool PipelineTask::run()
}

if (next_list.empty() && !breakpoints_stack.empty()) {
if (debug_mode()) {
notify(MaaMsg_Task_Debug_EndSub, {});
}
std::string top_bp = std::move(breakpoints_stack.top());
breakpoints_stack.pop();
pre_breakpoint = top_bp;
Expand Down

0 comments on commit b7c4a76

Please sign in to comment.