mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 19:58:53 +00:00
DVDInterface: Modernize With CPUThreadGuard
This commit is contained in:
parent
8f6fd912f7
commit
fe61efcd7a
7 changed files with 39 additions and 32 deletions
|
@ -794,15 +794,17 @@ void MainWindow::ChangeDisc()
|
|||
{
|
||||
std::vector<std::string> paths = StringListToStdVector(PromptFileNames());
|
||||
|
||||
if (!paths.empty())
|
||||
Core::RunAsCPUThread(
|
||||
[&paths] { Core::System::GetInstance().GetDVDInterface().ChangeDisc(paths); });
|
||||
if (paths.empty())
|
||||
return;
|
||||
|
||||
auto& system = Core::System::GetInstance();
|
||||
system.GetDVDInterface().ChangeDisc(Core::CPUThreadGuard{system}, paths);
|
||||
}
|
||||
|
||||
void MainWindow::EjectDisc()
|
||||
{
|
||||
Core::RunAsCPUThread(
|
||||
[] { Core::System::GetInstance().GetDVDInterface().EjectDisc(DVD::EjectCause::User); });
|
||||
auto& system = Core::System::GetInstance();
|
||||
system.GetDVDInterface().EjectDisc(Core::CPUThreadGuard{system}, DVD::EjectCause::User);
|
||||
}
|
||||
|
||||
void MainWindow::OpenUserFolder()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue