Buildfix (needed an include in the header on some platforms so let's move to the cpp file)

This commit is contained in:
Henrik Rydgard 2014-10-31 00:35:39 +01:00
parent 3377db4910
commit f5c9235640
2 changed files with 17 additions and 12 deletions

View file

@ -58,6 +58,21 @@ RAMBlockDevice::~RAMBlockDevice() {
delete[] image_;
}
bool RAMBlockDevice::ReadBlock(int blockNumber, u8 *outPtr) {
if (blockNumber >= 0 && blockNumber < totalBlocks_) {
u32 blockSize = GetBlockSize();
memcpy(outPtr, image_ + blockSize * blockNumber, blockSize);
return true;
}
return false;
}
u32 RAMBlockDevice::GetNumBlocks() {
return totalBlocks_;
}
// Android NDK does not support 64-bit file I/O using C streams
// so we fall back onto syscalls