DVDInterface: Remove GetVolume
For thread safety reasons, the currently inserted volume must only be accessed by the DVD thread (or by the CPU thread if it calls DVDThread::WaitUntilIdle() first). After this commit, only DVDThread.cpp can access the volume, which prevents code in other files from accessing the volume in a non-threadsafe way.
This commit is contained in:
1 parent
5a55957741
commit
2a2db16087
8 files changed
+157
-81
No files matched your search
@@ -12,6 +12,7 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/MsgHandler.h"
|
||||
#include "Core/HW/DVD/DVDInterface.h"
|
||||
#include "Core/HW/DVD/DVDThread.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
#include "Core/IOS/DI/DI.h"
|
||||
#include "Core/IOS/ES/ES.h"
|
||||
@@ -106,10 +107,10 @@ IPCCommandResult DI::IOCtlV(const IOCtlVRequest& request)
|
||||
INFO_LOG(IOS_DI, "DVDLowOpenPartition: partition_offset 0x%016" PRIx64, partition_offset);
|
||||
|
||||
// Read TMD to the buffer
|
||||
const IOS::ES::TMDReader tmd = DVDInterface::GetVolume().GetTMD();
|
||||
const IOS::ES::TMDReader tmd = DVDThread::GetTMD();
|
||||
const std::vector<u8> raw_tmd = tmd.GetRawTMD();
|
||||
Memory::CopyToEmu(request.io_vectors[0].address, raw_tmd.data(), raw_tmd.size());
|
||||
ES::DIVerify(tmd, DVDInterface::GetVolume().GetTicket());
|
||||
ES::DIVerify(tmd, DVDThread::GetTicket());
|
||||
|
||||
return_value = 1;
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user