diff --git a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp index ae3ca861147a..6b697f445514 100644 --- a/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp +++ b/Source/Core/InputCommon/ControllerInterface/Pipes/Pipes.cpp @@ -172,16 +172,11 @@ Core::DeviceRemoval PipeDevice::UpdateInput() // Read any pending characters off the pipe. If we hit a newline, // then dequeue a command off the front of m_buf and parse it. char buf[32]; - s32 bytes_read = readFromPipe(m_fd, buf, sizeof buf); - if (bytes_read == 0) - { - // Pipe died, so just quit out - return; - } + ssize_t bytes_read = read(m_fd, buf, sizeof buf); while (bytes_read > 0) { m_buf.append(buf, bytes_read); - bytes_read = readFromPipe(m_fd, buf, sizeof buf); + bytes_read = read(m_fd, buf, sizeof buf); } std::size_t newline = m_buf.find("\n"); while (newline != std::string::npos) @@ -192,6 +187,7 @@ Core::DeviceRemoval PipeDevice::UpdateInput() newline = m_buf.find("\n"); } } while (!finished && Config::Get(Config::SLIPPI_BLOCKING_PIPES)); + return Core::DeviceRemoval::Keep; } void PipeDevice::AddAxis(const std::string& name, double value)