HW/DVDInterface: Refactor to class.

This commit is contained in:
Admiral H. Curtiss
2023-03-09 21:43:03 +01:00
parent 3ec32c5aa5
commit eb25c46a91
18 changed files with 578 additions and 607 deletions

View File

@ -52,6 +52,7 @@
#include "Core/HW/EXI/EXI.h"
#include "Core/HW/EXI/EXI_Device.h"
#include "Core/HW/WiiSave.h"
#include "Core/System.h"
#include "Core/WiiUtils.h"
#include "DiscIO/Blob.h"
@ -852,7 +853,9 @@ void GameList::ChangeDisc()
if (!game)
return;
Core::RunAsCPUThread([file_path = game->GetFilePath()] { DVDInterface::ChangeDisc(file_path); });
Core::RunAsCPUThread([file_path = game->GetFilePath()] {
Core::System::GetInstance().GetDVDInterface().ChangeDisc(file_path);
});
}
QAbstractItemView* GameList::GetActiveView() const

View File

@ -746,12 +746,15 @@ void MainWindow::ChangeDisc()
std::vector<std::string> paths = StringListToStdVector(PromptFileNames());
if (!paths.empty())
Core::RunAsCPUThread([&paths] { DVDInterface::ChangeDisc(paths); });
Core::RunAsCPUThread(
[&paths] { Core::System::GetInstance().GetDVDInterface().ChangeDisc(paths); });
}
void MainWindow::EjectDisc()
{
Core::RunAsCPUThread([] { DVDInterface::EjectDisc(DVDInterface::EjectCause::User); });
Core::RunAsCPUThread([] {
Core::System::GetInstance().GetDVDInterface().EjectDisc(DVDInterface::EjectCause::User);
});
}
void MainWindow::OpenUserFolder()