diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2020-07-30 12:19:41 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-30 12:19:41 +0200 |
| commit | 9d44df0f0bd8076df89077a2a8cd650ddd798dc5 (patch) | |
| tree | e9a1d74c418366f2e1e19e851ff0cbfb24710471 /Source/Core/DolphinQt/MainWindow.cpp | |
| parent | 3d680ff2f68a52c8330de4f70620b5a0d30e3fdd (diff) | |
| parent | 2e8c5b4521d7a483d9895cd4294acd51636046d4 (diff) | |
Merge pull request #8875 from JosJuice/nkit-warning
DolphinQt: Show a warning when launching an NKit disc image
Diffstat (limited to 'Source/Core/DolphinQt/MainWindow.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/MainWindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/Core/DolphinQt/MainWindow.cpp b/Source/Core/DolphinQt/MainWindow.cpp index 1ecb875986..bff3a6422c 100644 --- a/Source/Core/DolphinQt/MainWindow.cpp +++ b/Source/Core/DolphinQt/MainWindow.cpp @@ -18,6 +18,7 @@ #include <future> #include <optional> +#include <variant> #if defined(__unix__) || defined(__unix) || defined(__APPLE__) #include <signal.h> @@ -83,6 +84,7 @@ #include "DolphinQt/HotkeyScheduler.h" #include "DolphinQt/MainWindow.h" #include "DolphinQt/MenuBar.h" +#include "DolphinQt/NKitWarningDialog.h" #include "DolphinQt/NetPlay/NetPlayBrowser.h" #include "DolphinQt/NetPlay/NetPlayDialog.h" #include "DolphinQt/NetPlay/NetPlaySetupDialog.h" @@ -952,6 +954,15 @@ void MainWindow::StartGame(const std::vector<std::string>& paths, void MainWindow::StartGame(std::unique_ptr<BootParameters>&& parameters) { + if (std::holds_alternative<BootParameters::Disc>(parameters->parameters)) + { + if (std::get<BootParameters::Disc>(parameters->parameters).volume->IsNKit()) + { + if (!NKitWarningDialog::ShowUnlessDisabled()) + return; + } + } + // If we're running, only start a new game once we've stopped the last. if (Core::GetState() != Core::State::Uninitialized) { |
