mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-15 17:30:27 +08:00
feat: MaaCore主任务错误时保存截图 (#14812)
* feat: MaaCore主任务错误时保存截图 * chore: Auto update by pre-commit hooks [skip changelog] --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
11
src/MaaCore/Task/InterfaceTask.cpp
Normal file
11
src/MaaCore/Task/InterfaceTask.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include "InterfaceTask.h"
|
||||
|
||||
bool asst::InterfaceTask::run()
|
||||
{
|
||||
if (PackageTask::run()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
save_img(utils::path("debug") / utils::path("interface"));
|
||||
return false;
|
||||
}
|
||||
@@ -9,6 +9,8 @@ public:
|
||||
using PackageTask::PackageTask;
|
||||
virtual ~InterfaceTask() override = default;
|
||||
|
||||
virtual bool run() override;
|
||||
|
||||
virtual bool set_params([[maybe_unused]] const json::value& params) { return true; }
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user