mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
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
|
||||
|
|
|
@ -120,18 +120,8 @@ public:
|
|||
RAMBlockDevice(BlockDevice *device);
|
||||
~RAMBlockDevice();
|
||||
|
||||
bool ReadBlock(int blockNumber, u8 *outPtr) override {
|
||||
if (blockNumber >= 0 && blockNumber < totalBlocks_) {
|
||||
u32 blockSize = GetBlockSize();
|
||||
memcpy(outPtr, image_ + blockSize * blockNumber, blockSize);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
u32 GetNumBlocks() override {
|
||||
return totalBlocks_;
|
||||
}
|
||||
bool ReadBlock(int blockNumber, u8 *outPtr) override;
|
||||
u32 GetNumBlocks() override;
|
||||
|
||||
private:
|
||||
int totalBlocks_;
|
||||
|
|
Loading…
Add table
Reference in a new issue