Skip to content

Commit 2c5c158

Browse files
fix: 修复adb控制器的isconnected不奏效的bug (#6)
Co-authored-by: MistEO <mistereo@hotmail.com>
1 parent 323297f commit 2c5c158

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

include/MaaUtils/IOStream/ChildPipeIOStream.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ class MAA_UTILS_API ChildPipeIOStream : public IOStream
3131
virtual bool release() override;
3232
virtual bool is_open() const override;
3333

34+
bool running();
35+
3436
protected:
3537
virtual std::string read_once(size_t max_count) override;
3638

source/IOStream/ChildPipeIOStream.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ bool ChildPipeIOStream::is_open() const
130130
return !pin_.eof();
131131
}
132132

133+
bool ChildPipeIOStream::running()
134+
{
135+
return child_.running();
136+
}
137+
133138
std::string ChildPipeIOStream::read_once(size_t max_count)
134139
{
135140
constexpr size_t kBufferSize = 128 * 1024;

0 commit comments

Comments
 (0)