diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-11-08 11:01:14 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-08 11:01:14 +1000 |
| commit | 2ebea1bfa7e6436d0379ab25951b31e28e296763 (patch) | |
| tree | 4153f393a93af63d2d4126c8012423b661af2fda /Source/Core | |
| parent | 47677ecaa705cb0f87d9f08fe455e445ccf98989 (diff) | |
| parent | 10d972789abb76077a48070ece3f9a20bb243f9c (diff) | |
Merge pull request #8433 from JosJuice/settings-onemulationstatechanged
DolphinQt: Call OnEmulationStateChanged when creating config window panes
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinQt/Config/SettingsWindow.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Settings/AudioPane.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Settings/GeneralPane.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Settings/WiiPane.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/DolphinQt/Settings/WiiPane.h | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/Source/Core/DolphinQt/Config/SettingsWindow.cpp b/Source/Core/DolphinQt/Config/SettingsWindow.cpp index 6318d216b8..912182d08c 100644 --- a/Source/Core/DolphinQt/Config/SettingsWindow.cpp +++ b/Source/Core/DolphinQt/Config/SettingsWindow.cpp @@ -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 diff --git a/Source/Core/DolphinQt/Settings/AudioPane.cpp b/Source/Core/DolphinQt/Settings/AudioPane.cpp index 4d780a3e1b..8c3df4ec76 100644 --- a/Source/Core/DolphinQt/Settings/AudioPane.cpp +++ b/Source/Core/DolphinQt/Settings/AudioPane.cpp @@ -37,6 +37,8 @@ AudioPane::AudioPane() connect(&Settings::Instance(), &Settings::VolumeChanged, this, &AudioPane::OnVolumeChanged); connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [=](Core::State state) { OnEmulationStateChanged(state != Core::State::Uninitialized); }); + + OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized); } void AudioPane::CreateWidgets() diff --git a/Source/Core/DolphinQt/Settings/GeneralPane.cpp b/Source/Core/DolphinQt/Settings/GeneralPane.cpp index c1140cf98f..1d8cc485a7 100644 --- a/Source/Core/DolphinQt/Settings/GeneralPane.cpp +++ b/Source/Core/DolphinQt/Settings/GeneralPane.cpp @@ -50,6 +50,8 @@ GeneralPane::GeneralPane(QWidget* parent) : QWidget(parent) connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &GeneralPane::OnEmulationStateChanged); + + OnEmulationStateChanged(Core::GetState()); } void GeneralPane::CreateLayout() diff --git a/Source/Core/DolphinQt/Settings/WiiPane.cpp b/Source/Core/DolphinQt/Settings/WiiPane.cpp index 87c44f793c..ba6df4d1c7 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.cpp +++ b/Source/Core/DolphinQt/Settings/WiiPane.cpp @@ -48,6 +48,7 @@ WiiPane::WiiPane(QWidget* parent) : QWidget(parent) LoadConfig(); ConnectLayout(); ValidateSelectionState(); + OnEmulationStateChanged(Core::GetState() != Core::State::Uninitialized); } void WiiPane::CreateLayout() @@ -92,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() diff --git a/Source/Core/DolphinQt/Settings/WiiPane.h b/Source/Core/DolphinQt/Settings/WiiPane.h index 33907c87af..375ac99b81 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.h +++ b/Source/Core/DolphinQt/Settings/WiiPane.h @@ -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 @@ private: void LoadConfig(); void OnSaveConfig(); + void OnEmulationStateChanged(bool running); void ValidateSelectionState(); |
