diff --git a/Source/Core/Core/Config/SYSCONFSettings.cpp b/Source/Core/Core/Config/SYSCONFSettings.cpp index 52449b6889..c2693a8d2b 100644 --- a/Source/Core/Core/Config/SYSCONFSettings.cpp +++ b/Source/Core/Core/Config/SYSCONFSettings.cpp @@ -14,6 +14,7 @@ const Info SYSCONF_COUNTRY{{System::SYSCONF, "IPL", "SADR"}, 0x6c}; const Info SYSCONF_WIDESCREEN{{System::SYSCONF, "IPL", "AR"}, true}; const Info SYSCONF_PROGRESSIVE_SCAN{{System::SYSCONF, "IPL", "PGS"}, true}; const Info SYSCONF_PAL60{{System::SYSCONF, "IPL", "E60"}, 0x01}; +const Info SYSCONF_SOUND_MODE{{System::SYSCONF, "IPL", "SND"}, 0x01}; // SYSCONF.BT @@ -22,13 +23,14 @@ const Info SYSCONF_SENSOR_BAR_SENSITIVITY{{System::SYSCONF, "BT", "SENS"}, const Info SYSCONF_SPEAKER_VOLUME{{System::SYSCONF, "BT", "SPKV"}, 0x58}; const Info SYSCONF_WIIMOTE_MOTOR{{System::SYSCONF, "BT", "MOT"}, true}; -const std::array SYSCONF_SETTINGS{ +const std::array SYSCONF_SETTINGS{ {{SYSCONF_SCREENSAVER, SysConf::Entry::Type::Byte}, {SYSCONF_LANGUAGE, SysConf::Entry::Type::Byte}, {SYSCONF_COUNTRY, SysConf::Entry::Type::BigArray}, {SYSCONF_WIDESCREEN, SysConf::Entry::Type::Byte}, {SYSCONF_PROGRESSIVE_SCAN, SysConf::Entry::Type::Byte}, {SYSCONF_PAL60, SysConf::Entry::Type::Byte}, + {SYSCONF_SOUND_MODE, SysConf::Entry::Type::Byte}, {SYSCONF_SENSOR_BAR_POSITION, SysConf::Entry::Type::Byte}, {SYSCONF_SENSOR_BAR_SENSITIVITY, SysConf::Entry::Type::Long}, {SYSCONF_SPEAKER_VOLUME, SysConf::Entry::Type::Byte}, diff --git a/Source/Core/Core/Config/SYSCONFSettings.h b/Source/Core/Core/Config/SYSCONFSettings.h index 9cf5d5221c..08efeb589e 100644 --- a/Source/Core/Core/Config/SYSCONFSettings.h +++ b/Source/Core/Core/Config/SYSCONFSettings.h @@ -22,6 +22,7 @@ extern const Info SYSCONF_COUNTRY; extern const Info SYSCONF_WIDESCREEN; extern const Info SYSCONF_PROGRESSIVE_SCAN; extern const Info SYSCONF_PAL60; +extern const Info SYSCONF_SOUND_MODE; // SYSCONF.BT @@ -36,6 +37,6 @@ struct SYSCONFSetting SysConf::Entry::Type type; }; -extern const std::array SYSCONF_SETTINGS; +extern const std::array SYSCONF_SETTINGS; } // namespace Config diff --git a/Source/Core/DolphinQt/Settings/WiiPane.cpp b/Source/Core/DolphinQt/Settings/WiiPane.cpp index c3b4e48d93..e348cd47f7 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.cpp +++ b/Source/Core/DolphinQt/Settings/WiiPane.cpp @@ -69,6 +69,8 @@ void WiiPane::ConnectLayout() &WiiPane::OnSaveConfig); connect(m_system_language_choice, qOverload(&QComboBox::currentIndexChanged), this, &WiiPane::OnSaveConfig); + connect(m_sound_mode_choice, qOverload(&QComboBox::currentIndexChanged), this, + &WiiPane::OnSaveConfig); connect(m_screensaver_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig); connect(m_pal60_mode_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig); connect(m_sd_card_checkbox, &QCheckBox::toggled, this, &WiiPane::OnSaveConfig); @@ -109,10 +111,12 @@ void WiiPane::CreateMisc() m_sd_card_checkbox = new QCheckBox(tr("Insert SD Card")); m_allow_sd_writes_checkbox = new QCheckBox(tr("Allow Writes to SD Card")); m_connect_keyboard_checkbox = new QCheckBox(tr("Connect USB Keyboard")); + m_aspect_ratio_choice_label = new QLabel(tr("Aspect Ratio:")); m_aspect_ratio_choice = new QComboBox(); m_aspect_ratio_choice->addItem(tr("4:3")); m_aspect_ratio_choice->addItem(tr("16:9")); + m_system_language_choice_label = new QLabel(tr("System Language:")); m_system_language_choice = new QComboBox(); m_system_language_choice->addItem(tr("Japanese")); @@ -126,6 +130,12 @@ void WiiPane::CreateMisc() m_system_language_choice->addItem(tr("Traditional Chinese")); m_system_language_choice->addItem(tr("Korean")); + m_sound_mode_choice_label = new QLabel(tr("Sound:")); + m_sound_mode_choice = new QComboBox(); + m_sound_mode_choice->addItem(tr("Mono")); + m_sound_mode_choice->addItem(tr("Stereo")); + m_sound_mode_choice->addItem(tr("Surround")); + m_pal60_mode_checkbox->setToolTip(tr("Sets the Wii display mode to 60Hz (480i) instead of 50Hz " "(576i) for PAL games.\nMay not work for all games.")); m_screensaver_checkbox->setToolTip(tr("Dims the screen after five minutes of inactivity.")); @@ -142,6 +152,8 @@ void WiiPane::CreateMisc() misc_settings_group_layout->addWidget(m_aspect_ratio_choice, 3, 1, 1, 1); misc_settings_group_layout->addWidget(m_system_language_choice_label, 4, 0, 1, 1); misc_settings_group_layout->addWidget(m_system_language_choice, 4, 1, 1, 1); + misc_settings_group_layout->addWidget(m_sound_mode_choice_label, 5, 0, 1, 1); + misc_settings_group_layout->addWidget(m_sound_mode_choice, 5, 1, 1, 1); } void WiiPane::CreateWhitelistedUSBPassthroughDevices() @@ -203,6 +215,7 @@ void WiiPane::OnEmulationStateChanged(bool running) m_pal60_mode_checkbox->setEnabled(!running); m_system_language_choice->setEnabled(!running); m_aspect_ratio_choice->setEnabled(!running); + m_sound_mode_choice->setEnabled(!running); m_wiimote_motor->setEnabled(!running); m_wiimote_speaker_volume->setEnabled(!running); m_wiimote_ir_sensitivity->setEnabled(!running); @@ -218,6 +231,7 @@ void WiiPane::LoadConfig() m_connect_keyboard_checkbox->setChecked(Settings::Instance().IsUSBKeyboardConnected()); m_aspect_ratio_choice->setCurrentIndex(Config::Get(Config::SYSCONF_WIDESCREEN)); m_system_language_choice->setCurrentIndex(Config::Get(Config::SYSCONF_LANGUAGE)); + m_sound_mode_choice->setCurrentIndex(Config::Get(Config::SYSCONF_SOUND_MODE)); PopulateUSBPassthroughListWidget(); @@ -244,6 +258,7 @@ void WiiPane::OnSaveConfig() Config::SetBase(Config::SYSCONF_SPEAKER_VOLUME, m_wiimote_speaker_volume->value()); Config::SetBase(Config::SYSCONF_LANGUAGE, m_system_language_choice->currentIndex()); Config::SetBase(Config::SYSCONF_WIDESCREEN, m_aspect_ratio_choice->currentIndex()); + Config::SetBase(Config::SYSCONF_SOUND_MODE, m_sound_mode_choice->currentIndex()); Config::SetBase(Config::SYSCONF_WIIMOTE_MOTOR, m_wiimote_motor->isChecked()); } diff --git a/Source/Core/DolphinQt/Settings/WiiPane.h b/Source/Core/DolphinQt/Settings/WiiPane.h index db9f75e914..7b0528dc16 100644 --- a/Source/Core/DolphinQt/Settings/WiiPane.h +++ b/Source/Core/DolphinQt/Settings/WiiPane.h @@ -50,6 +50,8 @@ private: QLabel* m_system_language_choice_label; QComboBox* m_aspect_ratio_choice; QLabel* m_aspect_ratio_choice_label; + QComboBox* m_sound_mode_choice; + QLabel* m_sound_mode_choice_label; // Whitelisted USB Passthrough Devices QListWidget* m_whitelist_usb_list;