summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/yuzu/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index e3fd38a02..b3a8da0ea 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2937,6 +2937,7 @@ void GMainWindow::OnLoadAmiibo() {
2937 if (nfc_state == Service::NFP::DeviceState::TagFound || 2937 if (nfc_state == Service::NFP::DeviceState::TagFound ||
2938 nfc_state == Service::NFP::DeviceState::TagMounted) { 2938 nfc_state == Service::NFP::DeviceState::TagMounted) {
2939 nfc->CloseAmiibo(); 2939 nfc->CloseAmiibo();
2940 QMessageBox::warning(this, tr("Amiibo"), tr("The current amiibo has been removed"));
2940 return; 2941 return;
2941 } 2942 }
2942 2943
@@ -2965,6 +2966,15 @@ void GMainWindow::LoadAmiibo(const QString& filename) {
2965 return; 2966 return;
2966 } 2967 }
2967 2968
2969 // Remove amiibo if one is connected
2970 const auto nfc_state = nfc->GetCurrentState();
2971 if (nfc_state == Service::NFP::DeviceState::TagFound ||
2972 nfc_state == Service::NFP::DeviceState::TagMounted) {
2973 nfc->CloseAmiibo();
2974 QMessageBox::warning(this, tr("Amiibo"), tr("The current amiibo has been removed"));
2975 return;
2976 }
2977
2968 QFile nfc_file{filename}; 2978 QFile nfc_file{filename};
2969 if (!nfc_file.open(QIODevice::ReadOnly)) { 2979 if (!nfc_file.open(QIODevice::ReadOnly)) {
2970 QMessageBox::warning(this, tr("Error opening Amiibo data file"), 2980 QMessageBox::warning(this, tr("Error opening Amiibo data file"),