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:
Status102
2025-11-22 02:33:31 +08:00
committed by GitHub
parent 5c37d751c7
commit b697fdc2c7
2 changed files with 13 additions and 0 deletions

View 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;
}

View File

@@ -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; }
};
}