diff options
| author | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-03-04 16:45:25 -0800 |
|---|---|---|
| committer | mitaclaw <140017135+mitaclaw@users.noreply.github.com> | 2024-03-08 15:17:41 -0800 |
| commit | fe61efcd7a6539db9820c583de5c4ad2518769a6 (patch) | |
| tree | eb224bd5629243579721a4cada2b8d0089a76d5a /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | 8f6fd912f7ef3d744661cfdd0c9c33d44c223310 (diff) | |
DVDInterface: Modernize With CPUThreadGuard
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index ff028f5d37..ab38f0d047 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -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() |
