From b197df2d1e6f2533933d6c8608eecf1376df3ef3 Mon Sep 17 00:00:00 2001 From: Logan McNaughton Date: Mon, 21 Jun 2021 11:28:10 -0600 Subject: [PATCH] update input qt --- mupen64plus-input-qt/configdialog.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mupen64plus-input-qt/configdialog.cpp b/mupen64plus-input-qt/configdialog.cpp index ebac22e..7245c97 100644 --- a/mupen64plus-input-qt/configdialog.cpp +++ b/mupen64plus-input-qt/configdialog.cpp @@ -16,12 +16,14 @@ void ControllerTab::fileDownloaded(QNetworkReply* pReply) { if (pReply->error()) { pReply->deleteLater(); + gamepadSelect->setCurrentText("Auto"); return; } QFile file("vosk-model.zip"); if (!file.open(QIODevice::WriteOnly)) { pReply->deleteLater(); + gamepadSelect->setCurrentText("Auto"); return; } file.write(pReply->readAll()); @@ -29,7 +31,16 @@ void ControllerTab::fileDownloaded(QNetworkReply* pReply) { QProcess process; QString command = "7za x vosk-model.zip"; process.start(command); - process.waitForFinished(-1); + bool success = process.waitForFinished(-1); + QMessageBox msgBox; + if (success) + msgBox.setText("Successfully extracted voice model"); + else + { + msgBox.setText("Failed to extract voice model"); + gamepadSelect->setCurrentText("Auto"); + } + msgBox.exec(); file.remove(); pReply->deleteLater(); }