mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-06 06:55:09 +00:00
- Improved sc function binder.
- Improved GLGSRender.
This commit is contained in:
parent
3bb7a299ca
commit
5753edf6ef
133 changed files with 13624 additions and 3898 deletions
36
rpcs3/Emu/FS/vfsStreamMemory.cpp
Normal file
36
rpcs3/Emu/FS/vfsStreamMemory.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#include "stdafx.h"
|
||||
#include "vfsStreamMemory.h"
|
||||
|
||||
vfsStreamMemory::vfsStreamMemory() : vfsStream()
|
||||
{
|
||||
}
|
||||
|
||||
vfsStreamMemory::vfsStreamMemory(u64 addr) : vfsStream()
|
||||
{
|
||||
Open(addr);
|
||||
}
|
||||
|
||||
void vfsStreamMemory::Open(u64 addr)
|
||||
{
|
||||
m_addr = addr;
|
||||
|
||||
vfsStream::Reset();
|
||||
}
|
||||
|
||||
u32 vfsStreamMemory::Write(const void* src, u32 size)
|
||||
{
|
||||
if(!Memory.IsGoodAddr(m_addr + Tell(), size)) return 0;
|
||||
|
||||
memcpy(&Memory[m_addr + Tell()], src, size);
|
||||
|
||||
return vfsStream::Write(src, size);
|
||||
}
|
||||
|
||||
u32 vfsStreamMemory::Read(void* dst, u32 size)
|
||||
{
|
||||
if(!Memory.IsGoodAddr(m_addr + Tell(), size)) return 0;
|
||||
|
||||
memcpy(dst, &Memory[m_addr + Tell()], size);
|
||||
|
||||
return vfsStream::Read(dst, size);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue