CDROM: Revamp/improve preload image procedure

This commit is contained in:
Connor McLaughlin
2022-07-23 13:23:54 +10:00
parent 8d7fdae683
commit a1edddc59d
9 changed files with 130 additions and 64 deletions

View File

@ -6,6 +6,8 @@
#include <condition_variable>
#include <thread>
class ProgressCallback;
class CDROMAsyncReader
{
public:
@ -40,6 +42,9 @@ public:
void SetMedia(std::unique_ptr<CDImage> media);
std::unique_ptr<CDImage> RemoveMedia();
/// Precaches image, either to memory, or using the underlying image precache.
bool Precache(ProgressCallback* callback);
void QueueReadSector(CDImage::LBA lba);
bool WaitForReadToComplete();