DiskIO: Clean up GetTMD() API.

This commit is contained in:
magumagu authored and JosJuice committed 2014-11-30 16:38:13 +01:00
1 parent b1df4e5986
commit 4bb48d09dd
5 files changed
+20 -15

No files matched your search

@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <cinttypes>
#include <memory>
#include "Common/CommonTypes.h"
#include "Common/Logging/LogManager.h"
@@ -113,11 +114,10 @@ bool CWII_IPC_HLE_Device_di::IOCtlV(u32 _CommandAddress)
INFO_LOG(WII_IPC_DVD, "DVDLowOpenPartition: partition_offset 0x%016" PRIx64, partition_offset);
// Read TMD to the buffer
u8 pTMD[0x800];
u32 tmdSz;
VolumeHandler::GetVolume()->GetTMD(pTMD, &tmdSz);
Memory::CopyToEmu(CommandBuffer.PayloadBuffer[0].m_Address, pTMD, tmdSz);
WII_IPC_HLE_Interface::ES_DIVerify(pTMD, tmdSz);
u32 tmd_size;
std::unique_ptr<u8[]> tmd_buf = VolumeHandler::GetVolume()->GetTMD(&tmd_size);
Memory::CopyToEmu(CommandBuffer.PayloadBuffer[0].m_Address, tmd_buf.get(), tmd_size);
WII_IPC_HLE_Interface::ES_DIVerify(tmd_buf.get(), tmd_size);
ReturnValue = 1;
}