| 135 | } |
| 136 | |
| 137 | u32 FSStream::read(void* buf, u32 sz) |
| 138 | { |
| 139 | u32 rd = 0; |
| 140 | if (isPxi()) { |
| 141 | mResult = FSPXI_ReadFile(FsPxiHandle, std::get<FSPXI_File>(mHandle), &rd, mOffset, buf, sz); |
| 142 | } |
| 143 | else { |
| 144 | mResult = FSFILE_Read(std::get<Handle>(mHandle), &rd, mOffset, buf, sz); |
| 145 | } |
| 146 | if (R_FAILED(mResult)) { |
| 147 | if (rd > sz) { |
| 148 | rd = sz; |
| 149 | } |
| 150 | } |
| 151 | mOffset += rd; |
| 152 | return rd; |
| 153 | } |
| 154 | |
| 155 | u32 FSStream::write(const void* buf, u32 sz) |
| 156 | { |
no outgoing calls