| 81 | } |
| 82 | |
| 83 | u32 StateWrapper::ReadOnlyMemoryStream::Read(void* buf, u32 count) |
| 84 | { |
| 85 | count = std::min(m_buf_length - m_buf_position, count); |
| 86 | if (count > 0) |
| 87 | { |
| 88 | std::memcpy(buf, &m_buf[m_buf_position], count); |
| 89 | m_buf_position += count; |
| 90 | } |
| 91 | return count; |
| 92 | } |
| 93 | |
| 94 | u32 StateWrapper::ReadOnlyMemoryStream::Write(const void* buf, u32 count) |
| 95 | { |