Buildfix (needed an include in the header on some platforms so let's move to the cpp file)
This commit is contained in:
parent
3377db4910
commit
f5c9235640
2 changed files with 17 additions and 12 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue