Skip to content
Permalink
Browse files

DolphinQt: Make WiiPane connect itself to EmulationStateChanged

  • Loading branch information...
JosJuice committed Oct 26, 2019
1 parent 8833e2a commit 10d972789abb76077a48070ece3f9a20bb243f9c
@@ -39,14 +39,7 @@ SettingsWindow::SettingsWindow(QWidget* parent) : QDialog(parent)
m_tab_widget->addTab(GetWrappedWidget(new AudioPane, this, 125, 100), tr("Audio"));
m_tab_widget->addTab(GetWrappedWidget(new PathPane, this, 125, 100), tr("Paths"));
m_tab_widget->addTab(GetWrappedWidget(new GameCubePane, this, 125, 100), tr("GameCube"));

auto* wii_pane = new WiiPane;
m_tab_widget->addTab(GetWrappedWidget(wii_pane, this, 125, 100), tr("Wii"));

connect(&Settings::Instance(), &Settings::EmulationStateChanged, [wii_pane](Core::State state) {
wii_pane->OnEmulationStateChanged(state != Core::State::Uninitialized);
});

m_tab_widget->addTab(GetWrappedWidget(new WiiPane, this, 125, 100), tr("Wii"));
m_tab_widget->addTab(GetWrappedWidget(new AdvancedPane, this, 125, 200), tr("Advanced"));

// Dialog box buttons
@@ -93,6 +93,10 @@ void WiiPane::ConnectLayout()
connect(m_wiimote_ir_sensitivity, &QSlider::valueChanged, this, &WiiPane::OnSaveConfig);
connect(m_wiimote_speaker_volume, &QSlider::valueChanged, this, &WiiPane::OnSaveConfig);
connect(m_wiimote_motor, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig);

// Emulation State
connect(&Settings::Instance(), &Settings::EmulationStateChanged,
[=](Core::State state) { OnEmulationStateChanged(state != Core::State::Uninitialized); });
}

void WiiPane::CreateMisc()
@@ -19,7 +19,6 @@ class WiiPane : public QWidget
Q_OBJECT
public:
explicit WiiPane(QWidget* parent = nullptr);
void OnEmulationStateChanged(bool running);

private:
void PopulateUSBPassthroughListWidget();
@@ -31,6 +30,7 @@ class WiiPane : public QWidget

void LoadConfig();
void OnSaveConfig();
void OnEmulationStateChanged(bool running);

void ValidateSelectionState();

0 comments on commit 10d9727

Please sign in to comment.
You can’t perform that action at this time.