mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-13 15:59:23 +01:00
DolphinQt: Disable verify button when emulation is running
Verifying a Wii game creates an instance of IOS, and Dolphin can't handle more than one instance of IOS at the same time. Properly supporting it is probably more effort than it's worth. Fixes https://bugs.dolphin-emu.org/issues/12494.
This commit is contained in:
parent
219f66c6e9
commit
55ef1069f1
@ -17,9 +17,11 @@
|
||||
#include <QVBoxLayout>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/Core.h"
|
||||
#include "DiscIO/Volume.h"
|
||||
#include "DiscIO/VolumeVerifier.h"
|
||||
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
|
||||
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);
|
||||
|
||||
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()
|
||||
|
@ -27,6 +27,9 @@ class VerifyWidget final : public QWidget
|
||||
public:
|
||||
explicit VerifyWidget(std::shared_ptr<DiscIO::Volume> volume);
|
||||
|
||||
private slots:
|
||||
void OnEmulationStateChanged();
|
||||
|
||||
private:
|
||||
void CreateWidgets();
|
||||
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
||||
|
Loading…
x
Reference in New Issue
Block a user