Merge pull request #9679 from JosJuice/disable-verify
DolphinQt: Disable verify button when emulation is running
This commit is contained in:
commit
ade9d6c954
|
@ -17,9 +17,11 @@
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Common/CommonTypes.h"
|
#include "Common/CommonTypes.h"
|
||||||
|
#include "Core/Core.h"
|
||||||
#include "DiscIO/Volume.h"
|
#include "DiscIO/Volume.h"
|
||||||
#include "DiscIO/VolumeVerifier.h"
|
#include "DiscIO/VolumeVerifier.h"
|
||||||
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
||||||
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
VerifyWidget::VerifyWidget(std::shared_ptr<DiscIO::Volume> volume) : m_volume(std::move(volume))
|
VerifyWidget::VerifyWidget(std::shared_ptr<DiscIO::Volume> volume) : m_volume(std::move(volume))
|
||||||
{
|
{
|
||||||
|
@ -38,6 +40,20 @@ VerifyWidget::VerifyWidget(std::shared_ptr<DiscIO::Volume> volume) : m_volume(st
|
||||||
layout->setStretchFactor(m_summary_text, 2);
|
layout->setStretchFactor(m_summary_text, 2);
|
||||||
|
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
|
||||||
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||||
|
&VerifyWidget::OnEmulationStateChanged);
|
||||||
|
|
||||||
|
OnEmulationStateChanged();
|
||||||
|
}
|
||||||
|
|
||||||
|
void VerifyWidget::OnEmulationStateChanged()
|
||||||
|
{
|
||||||
|
const bool running = Core::GetState() != Core::State::Uninitialized;
|
||||||
|
|
||||||
|
// Verifying a Wii game while emulation is running doesn't work correctly
|
||||||
|
// due to verification of a Wii game creating an instance of IOS
|
||||||
|
m_verify_button->setEnabled(!running);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerifyWidget::CreateWidgets()
|
void VerifyWidget::CreateWidgets()
|
||||||
|
|
|
@ -27,6 +27,9 @@ class VerifyWidget final : public QWidget
|
||||||
public:
|
public:
|
||||||
explicit VerifyWidget(std::shared_ptr<DiscIO::Volume> volume);
|
explicit VerifyWidget(std::shared_ptr<DiscIO::Volume> volume);
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void OnEmulationStateChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void CreateWidgets();
|
void CreateWidgets();
|
||||||
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
||||||
|
|
Loading…
Reference in New Issue