Qt: Add dump VRAM and SPU RAM actions
This commit is contained in:
parent
5746dcdbd4
commit
2b5cfb272c
9 changed files with 131 additions and 12 deletions
|
|
@ -1635,11 +1635,30 @@ void UpdateMemoryCards()
|
|||
|
||||
bool DumpRAM(const char* filename)
|
||||
{
|
||||
auto fp = FileSystem::OpenManagedCFile(filename, "wb");
|
||||
if (!fp)
|
||||
if (!IsValid())
|
||||
return false;
|
||||
|
||||
return std::fwrite(Bus::g_ram, Bus::RAM_SIZE, 1, fp.get()) == 1;
|
||||
return FileSystem::WriteBinaryFile(filename, Bus::g_ram, Bus::RAM_SIZE);
|
||||
}
|
||||
|
||||
bool DumpVRAM(const char* filename)
|
||||
{
|
||||
if (!IsValid())
|
||||
return false;
|
||||
|
||||
g_gpu->RestoreGraphicsAPIState();
|
||||
const bool result = g_gpu->DumpVRAMToFile(filename);
|
||||
g_gpu->ResetGraphicsAPIState();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool DumpSPURAM(const char* filename)
|
||||
{
|
||||
if (!IsValid())
|
||||
return false;
|
||||
|
||||
return FileSystem::WriteBinaryFile(filename, g_spu.GetRAM().data(), SPU::RAM_SIZE);
|
||||
}
|
||||
|
||||
bool HasMedia()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue