Config: Rename MAIN_WII_SPEAK_CONNECTED to MAIN_WII_SPEAK_MUTED

This commit is contained in:
Sepalani
2024-09-01 14:00:56 +04:00
parent aea5054509
commit 61ab0faab8
10 changed files with 18 additions and 36 deletions

View File

@ -57,11 +57,10 @@ void WiiSpeakWindow::CreateMainWindow()
auto* config_group = new QGroupBox(tr("Microphone Configuration"));
auto* config_layout = new QHBoxLayout();
auto checkbox_mic_connected = new QCheckBox(tr("Connect"), this);
checkbox_mic_connected->setChecked(Config::Get(Config::MAIN_WII_SPEAK_CONNECTED));
connect(checkbox_mic_connected, &QCheckBox::toggled, this,
&WiiSpeakWindow::SetWiiSpeakConnectionState);
config_layout->addWidget(checkbox_mic_connected);
auto checkbox_mic_muted = new QCheckBox(tr("Mute"), this);
checkbox_mic_muted->setChecked(Config::Get(Config::MAIN_WII_SPEAK_MUTED));
connect(checkbox_mic_muted, &QCheckBox::toggled, this, &WiiSpeakWindow::SetWiiSpeakMuted);
config_layout->addWidget(checkbox_mic_muted);
m_combobox_microphones = new QComboBox();
#ifndef HAVE_CUBEB
@ -94,9 +93,9 @@ void WiiSpeakWindow::EmulateWiiSpeak(bool emulate)
Config::SetBaseOrCurrent(Config::MAIN_EMULATE_WII_SPEAK, emulate);
}
void WiiSpeakWindow::SetWiiSpeakConnectionState(bool connected)
void WiiSpeakWindow::SetWiiSpeakMuted(bool muted)
{
Config::SetBaseOrCurrent(Config::MAIN_WII_SPEAK_CONNECTED, connected);
Config::SetBaseOrCurrent(Config::MAIN_WII_SPEAK_MUTED, muted);
}
void WiiSpeakWindow::OnEmulationStateChanged(Core::State state)

View File

@ -21,7 +21,7 @@ private:
void CreateMainWindow();
void OnEmulationStateChanged(Core::State state);
void EmulateWiiSpeak(bool emulate);
void SetWiiSpeakConnectionState(bool connected);
void SetWiiSpeakMuted(bool muted);
void OnInputDeviceChange();
QCheckBox* m_checkbox_enabled;