Merge pull request #12696 from mitaclaw/verify-widget-core-state-slot
VerifyWidget: Listen for Core::State OnEmulationStateChanged
This commit is contained in:
commit
d58c998d6d
|
@ -45,12 +45,12 @@ VerifyWidget::VerifyWidget(std::shared_ptr<DiscIO::Volume> volume) : m_volume(st
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||||
&VerifyWidget::OnEmulationStateChanged);
|
&VerifyWidget::OnEmulationStateChanged);
|
||||||
|
|
||||||
OnEmulationStateChanged();
|
OnEmulationStateChanged(Core::GetState(Core::System::GetInstance()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerifyWidget::OnEmulationStateChanged()
|
void VerifyWidget::OnEmulationStateChanged(Core::State state)
|
||||||
{
|
{
|
||||||
const bool running = Core::GetState(Core::System::GetInstance()) != Core::State::Uninitialized;
|
const bool running = state != Core::State::Uninitialized;
|
||||||
|
|
||||||
// Verifying a Wii game while emulation is running doesn't work correctly
|
// Verifying a Wii game while emulation is running doesn't work correctly
|
||||||
// due to verification of a Wii game creating an instance of IOS
|
// due to verification of a Wii game creating an instance of IOS
|
||||||
|
|
|
@ -15,6 +15,10 @@
|
||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
|
||||||
|
namespace Core
|
||||||
|
{
|
||||||
|
enum class State;
|
||||||
|
}
|
||||||
namespace DiscIO
|
namespace DiscIO
|
||||||
{
|
{
|
||||||
class Volume;
|
class Volume;
|
||||||
|
@ -26,10 +30,8 @@ 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 OnEmulationStateChanged(Core::State state);
|
||||||
void CreateWidgets();
|
void CreateWidgets();
|
||||||
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
std::pair<QCheckBox*, QLineEdit*> AddHashLine(QFormLayout* layout, QString text);
|
||||||
void ConnectWidgets();
|
void ConnectWidgets();
|
||||||
|
|
Loading…
Reference in New Issue